Package net.minecraft.util
Class FoodStats
- java.lang.Object
-
- net.minecraft.util.FoodStats
-
public class FoodStats extends java.lang.Object+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Constructor Summary
Constructors Constructor Description FoodStats()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExhaustion(float parFloat1)+ adds input to foodExhaustionLevel to a max of 40voidaddStats(int foodLevelIn, float foodSaturationModifier)+ Add food stats.voidaddStats(ItemFood foodItem, ItemStack parItemStack)+ Add food stats.intgetFoodLevel()+ Get the player's food level.intgetPrevFoodLevel()floatgetSaturationLevel()+ Get the player's food saturation level.booleanneedFood()+ Get whether the player must eat food.voidonUpdate(EntityPlayer player)+ Handles the food game logic.voidreadNBT(NBTTagCompound parNBTTagCompound)+ Reads the food data for the player.voidsetFoodLevel(int foodLevelIn)voidsetFoodSaturationLevel(float foodSaturationLevelIn)voidwriteNBT(NBTTagCompound parNBTTagCompound)+ Writes the food data for the player.
-
-
-
Method Detail
-
addStats
public void addStats(int foodLevelIn, float foodSaturationModifier)+ Add food stats.
-
onUpdate
public void onUpdate(EntityPlayer player)
+ Handles the food game logic.
-
readNBT
public void readNBT(NBTTagCompound parNBTTagCompound)
+ Reads the food data for the player.
-
writeNBT
public void writeNBT(NBTTagCompound parNBTTagCompound)
+ Writes the food data for the player.
-
getFoodLevel
public int getFoodLevel()
+ Get the player's food level.
-
getPrevFoodLevel
public int getPrevFoodLevel()
-
needFood
public boolean needFood()
+ Get whether the player must eat food.
-
addExhaustion
public void addExhaustion(float parFloat1)
+ adds input to foodExhaustionLevel to a max of 40
-
getSaturationLevel
public float getSaturationLevel()
+ Get the player's food saturation level.
-
setFoodLevel
public void setFoodLevel(int foodLevelIn)
-
setFoodSaturationLevel
public void setFoodSaturationLevel(float foodSaturationLevelIn)
-
-