public class FoodStats
extends java.lang.Object
Constructor and Description |
---|
FoodStats() |
Modifier and Type | Method and Description |
---|---|
void |
addExhaustion(float exhaustion)
adds input to foodExhaustionLevel to a max of 40
|
void |
addStats(int foodLevelIn,
float foodSaturationModifier)
Add food stats.
|
void |
addStats(ItemFood foodItem,
ItemStack stack) |
int |
getFoodLevel()
Get the player's food level.
|
float |
getSaturationLevel()
Get the player's food saturation level.
|
boolean |
needFood()
Get whether the player must eat food.
|
void |
onUpdate(EntityPlayer player)
Handles the food game logic.
|
void |
readNBT(NBTTagCompound compound)
Reads the food data for the player.
|
void |
setFoodLevel(int foodLevelIn) |
void |
setFoodSaturationLevel(float foodSaturationLevelIn) |
void |
writeNBT(NBTTagCompound compound)
Writes the food data for the player.
|
public void addStats(int foodLevelIn, float foodSaturationModifier)
public void onUpdate(EntityPlayer player)
public void readNBT(NBTTagCompound compound)
public void writeNBT(NBTTagCompound compound)
public int getFoodLevel()
public boolean needFood()
public void addExhaustion(float exhaustion)
public float getSaturationLevel()
public void setFoodLevel(int foodLevelIn)
public void setFoodSaturationLevel(float foodSaturationLevelIn)