public class HungerManager extends Object
Modifier and Type | Field and Description |
---|---|
private float |
exhaustion |
private int |
foodLevel |
private float |
foodSaturationLevel |
private int |
foodStarvationTimer |
private int |
prevFoodLevel |
Constructor and Description |
---|
HungerManager() |
Modifier and Type | Method and Description |
---|---|
void |
add(int food,
float float2) |
void |
addExhaustion(float exhaustion) |
void |
eat(Item item,
ItemStack stack) |
void |
fromTag(CompoundTag tag) |
int |
getFoodLevel() |
float |
getSaturationLevel() |
boolean |
isNotFull() |
void |
setFoodLevel(int foodLevel) |
void |
setSaturationLevelClient(float saturationLevel) |
void |
toTag(CompoundTag tag) |
void |
update(PlayerEntity player) |
private int foodLevel
private float foodSaturationLevel
private float exhaustion
private int foodStarvationTimer
private int prevFoodLevel
public void add(int food, float float2)
public void update(PlayerEntity player)
public void fromTag(CompoundTag tag)
public void toTag(CompoundTag tag)
public int getFoodLevel()
public boolean isNotFull()
public void addExhaustion(float exhaustion)
public float getSaturationLevel()
public void setFoodLevel(int foodLevel)
@Environment(value=CLIENT) public void setSaturationLevelClient(float saturationLevel)