Class FoodItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.FoodItem
Direct Known Subclasses:
AppleItem, ChorusFruitItem, CropItem, FishItem, StewItem

public class FoodItem extends Item
Mappings:
Namespace Name
official afd
intermediary net/minecraft/class_1065
named net/minecraft/item/FoodItem
  • Field Details

    • eatingTime

      public final int eatingTime
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lafd;a:I
      intermediary field_4198 Lnet/minecraft/class_1065;field_4198:I
      named eatingTime Lnet/minecraft/item/FoodItem;eatingTime:I
    • hungerPoints

      private final int hungerPoints
      Mappings:
      Namespace Name Mixin selector
      official b Lafd;b:I
      intermediary field_4199 Lnet/minecraft/class_1065;field_4199:I
      named hungerPoints Lnet/minecraft/item/FoodItem;hungerPoints:I
    • saturation

      private final float saturation
      Mappings:
      Namespace Name Mixin selector
      official c Lafd;c:F
      intermediary field_4202 Lnet/minecraft/class_1065;field_4202:F
      named saturation Lnet/minecraft/item/FoodItem;saturation:F
    • cookable

      private final boolean cookable
      Mappings:
      Namespace Name Mixin selector
      official d Lafd;d:Z
      intermediary field_4200 Lnet/minecraft/class_1065;field_4200:Z
      named cookable Lnet/minecraft/item/FoodItem;cookable:Z
    • alwaysEdible

      private boolean alwaysEdible
      Mappings:
      Namespace Name Mixin selector
      official e Lafd;e:Z
      intermediary field_4201 Lnet/minecraft/class_1065;field_4201:Z
      named alwaysEdible Lnet/minecraft/item/FoodItem;alwaysEdible:Z
    • field_12297

      private StatusEffectInstance field_12297
      Mappings:
      Namespace Name Mixin selector
      official f Lafd;f:Lsh;
      intermediary field_12297 Lnet/minecraft/class_1065;field_12297:Lnet/minecraft/class_861;
      named field_12297 Lnet/minecraft/item/FoodItem;field_12297:Lnet/minecraft/entity/effect/StatusEffectInstance;
    • effectChance

      private float effectChance
      Mappings:
      Namespace Name Mixin selector
      official n Lafd;n:F
      intermediary field_4206 Lnet/minecraft/class_1065;field_4206:F
      named effectChance Lnet/minecraft/item/FoodItem;effectChance:F
  • Constructor Details

    • FoodItem

      public FoodItem(int hungerPoints, float saturation, boolean cookable)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lafd;<init>(IFZ)V
      intermediary <init> Lnet/minecraft/class_1065;<init>(IFZ)V
      named <init> Lnet/minecraft/item/FoodItem;<init>(IFZ)V
    • FoodItem

      public FoodItem(int hungerPoints, boolean cookable)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lafd;<init>(IZ)V
      intermediary <init> Lnet/minecraft/class_1065;<init>(IZ)V
      named <init> Lnet/minecraft/item/FoodItem;<init>(IZ)V
  • Method Details

    • method_3367

      public ItemStack method_3367(ItemStack stack, World world, LivingEntity entity)
      Overrides:
      method_3367 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lafj;Lajs;Lsw;)Lafj;
      intermediary method_3367 Lnet/minecraft/class_1069;method_3367(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_1699;)Lnet/minecraft/class_1071;
      named method_3367 Lnet/minecraft/item/Item;method_3367(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/item/ItemStack;
    • eat

      protected void eat(ItemStack stack, World world, PlayerEntity player)
      Mappings:
      Namespace Name Mixin selector
      official a Lafd;a(Lafj;Lajs;Laay;)V
      intermediary method_3336 Lnet/minecraft/class_1065;method_3336(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Lnet/minecraft/class_988;)V
      named eat Lnet/minecraft/item/FoodItem;eat(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;)V
    • getMaxUseTime

      public int getMaxUseTime(ItemStack stack)
      Overrides:
      getMaxUseTime in class Item
      Mappings:
      Namespace Name Mixin selector
      official e Lafh;e(Lafj;)I
      intermediary method_3350 Lnet/minecraft/class_1069;method_3350(Lnet/minecraft/class_1071;)I
      named getMaxUseTime Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
    • getUseAction

      public UseAction getUseAction(ItemStack stack)
      Returns the UseAction for an item when the item is used. Used by food, potions, bows, etc.
      Overrides:
      getUseAction in class Item
      Parameters:
      stack - The ItemStack that was used
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official f Lafh;f(Lafj;)Lagu;
      intermediary method_3366 Lnet/minecraft/class_1069;method_3366(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1099;
      named getUseAction Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
    • method_13649

      public TypedActionResult<ItemStack> method_13649(World world, PlayerEntity player, Hand hand)
      Overrides:
      method_13649 in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lafh;a(Lajs;Laay;Lri;)Lrl;
      intermediary method_13649 Lnet/minecraft/class_1069;method_13649(Lnet/minecraft/class_1150;Lnet/minecraft/class_988;Lnet/minecraft/class_2961;)Lnet/minecraft/class_2963;
      named method_13649 Lnet/minecraft/item/Item;method_13649(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
    • getHungerPoints

      public int getHungerPoints(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official h Lafd;h(Lafj;)I
      intermediary method_6360 Lnet/minecraft/class_1065;method_6360(Lnet/minecraft/class_1071;)I
      named getHungerPoints Lnet/minecraft/item/FoodItem;getHungerPoints(Lnet/minecraft/item/ItemStack;)I
    • getSaturation

      public float getSaturation(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official i Lafd;i(Lafj;)F
      intermediary method_6361 Lnet/minecraft/class_1065;method_6361(Lnet/minecraft/class_1071;)F
      named getSaturation Lnet/minecraft/item/FoodItem;getSaturation(Lnet/minecraft/item/ItemStack;)F
    • isCokkable

      public boolean isCokkable()
      Mappings:
      Namespace Name Mixin selector
      official g Lafd;g()Z
      intermediary method_3339 Lnet/minecraft/class_1065;method_3339()Z
      named isCokkable Lnet/minecraft/item/FoodItem;isCokkable()Z
    • method_11371

      public FoodItem method_11371(StatusEffectInstance statusEffectInstance, float float2)
      Mappings:
      Namespace Name Mixin selector
      official a Lafd;a(Lsh;F)Lafd;
      intermediary method_11371 Lnet/minecraft/class_1065;method_11371(Lnet/minecraft/class_861;F)Lnet/minecraft/class_1065;
      named method_11371 Lnet/minecraft/item/FoodItem;method_11371(Lnet/minecraft/entity/effect/StatusEffectInstance;F)Lnet/minecraft/item/FoodItem;
    • alwaysEdible

      public FoodItem alwaysEdible()
      Mappings:
      Namespace Name Mixin selector
      official h Lafd;h()Lafd;
      intermediary method_3340 Lnet/minecraft/class_1065;method_3340()Lnet/minecraft/class_1065;
      named alwaysEdible Lnet/minecraft/item/FoodItem;alwaysEdible()Lnet/minecraft/item/FoodItem;