public class FoodStats
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private float |
foodExhaustionLevel |
private int |
foodLevel |
private float |
foodSaturationLevel |
private int |
foodTimer |
private int |
prevFoodLevel |
Constructor and Description |
---|
FoodStats() |
Modifier and Type | Method and Description |
---|---|
void |
addExhaustion(float exhaustion) |
void |
addStats(int foodLevelIn,
float foodSaturationModifier) |
void |
consume(Item maybeFood,
ItemStack stack) |
int |
getFoodLevel() |
float |
getSaturationLevel() |
boolean |
needFood() |
void |
read(CompoundNBT compound) |
void |
setFoodLevel(int foodLevelIn) |
void |
setFoodSaturationLevel(float foodSaturationLevelIn) |
void |
tick(PlayerEntity player) |
void |
write(CompoundNBT compound) |
private int foodLevel
private float foodSaturationLevel
private float foodExhaustionLevel
private int foodTimer
private int prevFoodLevel
public void addStats(int foodLevelIn, float foodSaturationModifier)
public void tick(PlayerEntity player)
public void read(CompoundNBT compound)
public void write(CompoundNBT 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)