Class FoodItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.FoodItem
All Implemented Interfaces:
Itemable
Direct Known Subclasses:
AppleItem, ChorusFruitItem, class_3550, CropItem, FishItem, StewItem

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

    • hungerPoints

      private final int hungerPoints
      Mappings:
      Namespace Name Mixin selector
      official a Lasv;a: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 b Lasv;b: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 c Lasv;c: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 d Lasv;d:Z
      intermediary field_4201 Lnet/minecraft/class_1065;field_4201:Z
      named alwaysEdible Lnet/minecraft/item/FoodItem;alwaysEdible:Z
    • field_17184

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

      private StatusEffectInstance field_12297
      Mappings:
      Namespace Name Mixin selector
      official k Lasv;k:Laek;
      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 l Lasv;l: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 int2, float float2, boolean bool, Item.Settings settings)
  • 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 Lata;a(Late;Laxy;Lafa;)Late;
      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 Lasv;a(Late;Laxy;Laog;)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 c Lata;c(Late;)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 d Lata;d(Late;)Lauo;
      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 Lata;a(Laxy;Laog;Ladk;)Ladn;
      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 e Lasv;e(Late;)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 f Lasv;f(Late;)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 d Lasv;d()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 Lasv;a(Laek;F)Lasv;
      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 e Lasv;e()Lasv;
      intermediary method_3340 Lnet/minecraft/class_1065;method_3340()Lnet/minecraft/class_1065;
      named alwaysEdible Lnet/minecraft/item/FoodItem;alwaysEdible()Lnet/minecraft/item/FoodItem;
    • method_16065

      public FoodItem method_16065()
      Mappings:
      Namespace Name Mixin selector
      official f Lasv;f()Lasv;
      intermediary method_16065 Lnet/minecraft/class_1065;method_16065()Lnet/minecraft/class_1065;
      named method_16065 Lnet/minecraft/item/FoodItem;method_16065()Lnet/minecraft/item/FoodItem;