Package net.minecraft.world.food
Class FoodData
java.lang.Object
net.minecraft.world.food.FoodData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate intprivate intprivate floatprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalSaveData(CompoundTag p_38720_) voidaddExhaustion(float p_38704_) voideat(int p_38708_, float p_38709_) voidDeprecated.voideat(Item p_38713_, ItemStack p_38714_, LivingEntity entity) floatintintfloatbooleanvoidreadAdditionalSaveData(CompoundTag p_38716_) voidsetExhaustion(float p_150379_) voidsetFoodLevel(int p_38706_) voidsetSaturation(float p_38718_) void
-
Field Details
-
foodLevel
private int foodLevel -
saturationLevel
private float saturationLevel -
exhaustionLevel
private float exhaustionLevel -
tickTimer
private int tickTimer -
lastFoodLevel
private int lastFoodLevel
-
-
Constructor Details
-
FoodData
public FoodData()
-
-
Method Details
-
eat
public void eat(int p_38708_, float p_38709_) -
eat
Deprecated. -
eat
-
tick
-
readAdditionalSaveData
-
addAdditionalSaveData
-
getFoodLevel
public int getFoodLevel() -
getLastFoodLevel
public int getLastFoodLevel() -
needsFood
public boolean needsFood() -
addExhaustion
public void addExhaustion(float p_38704_) -
getExhaustionLevel
public float getExhaustionLevel() -
getSaturationLevel
public float getSaturationLevel() -
setFoodLevel
public void setFoodLevel(int p_38706_) -
setSaturation
public void setSaturation(float p_38718_) -
setExhaustion
public void setExhaustion(float p_150379_)
-