Class ExpandFoodData

java.lang.Object
com.blamejared.crafttweaker.natives.food.ExpandFoodData

@ZenRegister public class ExpandFoodData extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addExhaustion(net.minecraft.world.food.FoodData internal, float exhaustion)
    Adds exhaustion to the entity.
    static void
    eat(net.minecraft.world.food.FoodData internal, int foodLevelModifier, float saturationLevelModifier)
    Replenishes the food level and saturation level.
    static void
    eat(net.minecraft.world.food.FoodData internal, net.minecraft.world.food.FoodProperties foodProperties)
    Replenishes the food level and saturation level.
    static float
    getExhaustionLevel(net.minecraft.world.food.FoodData internal)
    Gets the exhaustion level.
    static int
    getFoodLevel(net.minecraft.world.food.FoodData internal)
    Gets the food level.
    static int
    getLastFoodLevel(net.minecraft.world.food.FoodData internal)
    Gets the last food level.
    static float
    getSaturationLevel(net.minecraft.world.food.FoodData internal)
    Gets the saturation level.
    static boolean
    needsFood(net.minecraft.world.food.FoodData internal)
    Checks if the entity needs food.
    static void
    setExhaustion(net.minecraft.world.food.FoodData internal, float exhaustionLevel)
    Sets the exhaustion level.
    static void
    setFoodLevel(net.minecraft.world.food.FoodData internal, int foodLevel)
    Sets the food level.
    static void
    setSaturation(net.minecraft.world.food.FoodData internal, float saturationLevel)
    Sets the saturation level.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.