Class AppleItem


public class AppleItem extends FoodItem
Mappings:
Namespace Name
official zt
intermediary net/minecraft/class_1066
named net/minecraft/item/AppleItem
  • Constructor Details

    • AppleItem

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

    • hasEnchantmentGlint

      @Environment(CLIENT) public boolean hasEnchantmentGlint(ItemStack stack)
      Returns whether the current item has an enchantment glint. Used by enchanted golden apples and enchanted items.
      Overrides:
      hasEnchantmentGlint in class Item
      See Also:
      • net.minecraft.item.GoldenAppleItem
      Mappings:
      Namespace Name Mixin selector
      official f Lzw;f(Lzx;)Z
      intermediary method_3374 Lnet/minecraft/class_1069;method_3374(Lnet/minecraft/class_1071;)Z
      named hasEnchantmentGlint Lnet/minecraft/item/Item;hasEnchantmentGlint(Lnet/minecraft/item/ItemStack;)Z
    • getRarity

      public Rarity getRarity(ItemStack stack)
      Returns the rarity of the current Item. Used by golden apples, enchanted items and potions.
      Overrides:
      getRarity in class Item
      Parameters:
      stack - The item in an ItemStack form
      Returns:
      The rarity of the ItemStack
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official g Lzw;g(Lzx;)Laaj;
      intermediary method_3377 Lnet/minecraft/class_1069;method_3377(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1081;
      named getRarity Lnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
    • eat

      protected void eat(ItemStack stack, World world, PlayerEntity player)
      Overrides:
      eat in class FoodItem
      Mappings:
      Namespace Name Mixin selector
      official c Lzs;c(Lzx;Ladm;Lwn;)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
    • appendItemStacks

      @Environment(CLIENT) public void appendItemStacks(Item item, ItemGroup group, List<ItemStack> list)
      Registers an item's sub items
      Overrides:
      appendItemStacks in class Item
      Parameters:
      item - The Item instance
      group - The ItemGroup
      list - The list of sub items
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzw;Lyz;Ljava/util/List;)V
      intermediary method_3345 Lnet/minecraft/class_1069;method_3345(Lnet/minecraft/class_1069;Lnet/minecraft/class_1041;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/itemgroup/ItemGroup;Ljava/util/List;)V