Package net.minecraft.world.food
Class FoodData
java.lang.Object
net.minecraft.world.food.FoodData
-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private int
private int
private float
private int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
add
(int p_340988_, float p_340961_) void
addAdditionalSaveData
(CompoundTag p_38720_) void
addExhaustion
(float p_38704_) void
eat
(int p_38708_, float p_38709_) void
Deprecated.void
eat
(ItemStack p_38714_, LivingEntity entity) float
int
int
float
boolean
void
readAdditionalSaveData
(CompoundTag p_38716_) void
setExhaustion
(float p_150379_) void
setFoodLevel
(int p_38706_) void
setSaturation
(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
-
add
private void add(int p_340988_, float p_340961_) -
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_)
-