Class AppleItem


public class AppleItem
extends FoodItem
Mappings:
Namespace Name
official zt
intermediary net/minecraft/class_2051
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_2050;<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_8288 Lnet/minecraft/class_2054;method_8288(Lnet/minecraft/class_2056;)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:
      net.minecraft.item.GoldenAppleItem, PotionItem
      Mappings:
      Namespace Name Mixin selector
      official g Lzw;g(Lzx;)Laaj;
      intermediary method_8290 Lnet/minecraft/class_2054;method_8290(Lnet/minecraft/class_2056;)Lnet/minecraft/class_12;
      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_8238 Lnet/minecraft/class_2050;method_8238(Lnet/minecraft/class_2056;Lnet/minecraft/class_99;Lnet/minecraft/class_1963;)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_8255 Lnet/minecraft/class_2054;method_8255(Lnet/minecraft/class_2054;Lnet/minecraft/class_2029;Ljava/util/List;)V
      named appendItemStacks Lnet/minecraft/item/Item;appendItemStacks(Lnet/minecraft/item/Item;Lnet/minecraft/item/ItemGroup;Ljava/util/List;)V