Package net.minecraft.entity.player
Class HungerManager
java.lang.Object
net.minecraft.entity.player.HungerManager
public class HungerManager extends Object
-
Field Summary
Fields Modifier and Type Field Description private float
exhaustion
private int
foodLevel
private float
foodSaturationLevel
private int
foodStarvationTimer
private int
prevFoodLevel
-
Constructor Summary
Constructors Constructor Description HungerManager()
-
Method Summary
Modifier and Type Method 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)
-
Field Details
-
foodLevel
private int foodLevel -
foodSaturationLevel
private float foodSaturationLevel -
exhaustion
private float exhaustion -
foodStarvationTimer
private int foodStarvationTimer -
prevFoodLevel
private int prevFoodLevel
-
-
Constructor Details
-
HungerManager
public HungerManager()
-
-
Method Details
-
add
public void add(int food, float float2) -
eat
-
update
-
fromTag
-
toTag
-
getFoodLevel
public int getFoodLevel() -
isNotFull
public boolean isNotFull() -
addExhaustion
public void addExhaustion(float exhaustion) -
getSaturationLevel
public float getSaturationLevel() -
setFoodLevel
public void setFoodLevel(int foodLevel) -
setSaturationLevelClient
@Environment(CLIENT) public void setSaturationLevelClient(float saturationLevel)
-