Class ExpandFoodData
java.lang.Object
com.blamejared.crafttweaker.natives.food.ExpandFoodData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddExhaustion(net.minecraft.world.food.FoodData internal, float exhaustion) Adds exhaustion to the entity.static voideat(net.minecraft.world.food.FoodData internal, int foodLevelModifier, float saturationLevelModifier) Replenishes the food level and saturation level.static voideat(net.minecraft.world.food.FoodData internal, net.minecraft.world.food.FoodProperties foodProperties) Replenishes the food level and saturation level.static floatgetExhaustionLevel(net.minecraft.world.food.FoodData internal) Gets the exhaustion level.static intgetFoodLevel(net.minecraft.world.food.FoodData internal) Gets the food level.static intgetLastFoodLevel(net.minecraft.world.food.FoodData internal) Gets the last food level.static floatgetSaturationLevel(net.minecraft.world.food.FoodData internal) Gets the saturation level.static booleanneedsFood(net.minecraft.world.food.FoodData internal) Checks if the entity needs food.static voidsetExhaustion(net.minecraft.world.food.FoodData internal, float exhaustionLevel) Sets the exhaustion level.static voidsetFoodLevel(net.minecraft.world.food.FoodData internal, int foodLevel) Sets the food level.static voidsetSaturation(net.minecraft.world.food.FoodData internal, float saturationLevel) Sets the saturation level.
-
Constructor Details
-
ExpandFoodData
public ExpandFoodData()
-
-
Method Details
-
eat
public static void eat(net.minecraft.world.food.FoodData internal, int foodLevelModifier, float saturationLevelModifier) Replenishes the food level and saturation level.- Parameters:
foodLevelModifier- The amount to modify the food level by.saturationLevelModifier- The amount to modify the saturation level by.
-
eat
public static void eat(net.minecraft.world.food.FoodData internal, net.minecraft.world.food.FoodProperties foodProperties) Replenishes the food level and saturation level.- Parameters:
foodProperties- The food properties to eat.
-
getFoodLevel
public static int getFoodLevel(net.minecraft.world.food.FoodData internal) Gets the food level.- Returns:
- The food level.
-
getLastFoodLevel
public static int getLastFoodLevel(net.minecraft.world.food.FoodData internal) Gets the last food level.- Returns:
- The last food level.
-
needsFood
public static boolean needsFood(net.minecraft.world.food.FoodData internal) Checks if the entity needs food.- Returns:
- True if the entity needs food, false otherwise.
-
addExhaustion
public static void addExhaustion(net.minecraft.world.food.FoodData internal, float exhaustion) Adds exhaustion to the entity.- Parameters:
exhaustion- The amount of exhaustion to add.
-
getExhaustionLevel
public static float getExhaustionLevel(net.minecraft.world.food.FoodData internal) Gets the exhaustion level.- Returns:
- The exhaustion level.
-
getSaturationLevel
public static float getSaturationLevel(net.minecraft.world.food.FoodData internal) Gets the saturation level.- Returns:
- The saturation level.
-
setFoodLevel
public static void setFoodLevel(net.minecraft.world.food.FoodData internal, int foodLevel) Sets the food level.- Parameters:
foodLevel- The amount of food to set.
-
setSaturation
public static void setSaturation(net.minecraft.world.food.FoodData internal, float saturationLevel) Sets the saturation level.- Parameters:
saturationLevel- The amount of saturation to set.
-
setExhaustion
public static void setExhaustion(net.minecraft.world.food.FoodData internal, float exhaustionLevel) Sets the exhaustion level.- Parameters:
exhaustionLevel- The amount of exhaustion to set.
-