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 floatexhaustionprivate intfoodLevelprivate floatfoodSaturationLevelprivate intfoodStarvationTimerprivate intprevFoodLevel -
Constructor Summary
Constructors Constructor Description HungerManager() -
Method Summary
Modifier and Type Method Description voidadd(int food, float float2)voidaddExhaustion(float exhaustion)voideat(Item item, ItemStack stack)voidfromTag(CompoundTag tag)intgetFoodLevel()floatgetSaturationLevel()booleanisNotFull()voidsetFoodLevel(int foodLevel)voidsetSaturationLevelClient(float saturationLevel)voidtoTag(CompoundTag tag)voidupdate(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)
-