Class EnchantedBookItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem

public class EnchantedBookItem extends Item
Mappings:
Namespace Name
official ahy
intermediary net/minecraft/class_1428
named net/minecraft/item/EnchantedBookItem
  • Constructor Details

    • EnchantedBookItem

      public EnchantedBookItem()
      Mappings:
      Namespace Name Mixin selector
      official <init> Lain;<init>()V
      intermediary <init> Lnet/minecraft/class_1069;<init>()V
      named <init> Lnet/minecraft/item/Item;<init>()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_ Lain;f_(Laip;)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
    • isEnchantable

      public boolean isEnchantable(ItemStack stack)
      Returns whether the current item can have enchantments. It does this by verifying that the item's maximum stack size is 1 and the item can break.
      Overrides:
      isEnchantable in class Item
      Mappings:
      Namespace Name Mixin selector
      official g_ Lain;g_(Laip;)Z
      intermediary method_3385 Lnet/minecraft/class_1069;method_3385(Lnet/minecraft/class_1071;)Z
      named isEnchantable Lnet/minecraft/item/Item;isEnchantable(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 Lain;g(Laip;)Laje;
      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;
    • getEnchantmentNbt

      public static NbtList getEnchantmentNbt(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official h Lahy;h(Laip;)Lge;
      intermediary method_4611 Lnet/minecraft/class_1428;method_4611(Lnet/minecraft/class_1071;)Lnet/minecraft/class_474;
      named getEnchantmentNbt Lnet/minecraft/item/EnchantedBookItem;getEnchantmentNbt(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/nbt/NbtList;
    • appendTooltips

      @Environment(CLIENT) public void appendTooltips(ItemStack stack, @Nullable World world, List<String> tooltip, TooltipContext tooltipContext)
      Overrides:
      appendTooltips in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Laip;Lamu;Ljava/util/List;Lakb;)V
      intermediary method_14234 Lnet/minecraft/class_1069;method_14234(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Ljava/util/List;Lnet/minecraft/class_3191;)V
      named appendTooltips Lnet/minecraft/item/Item;appendTooltips(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/TooltipContext;)V
    • addEnchantment

      public static void addEnchantment(ItemStack stack, EnchantmentLevelEntry itemStack)
      Mappings:
      Namespace Name Mixin selector
      official a Lahy;a(Laip;Laln;)V
      intermediary method_4607 Lnet/minecraft/class_1428;method_4607(Lnet/minecraft/class_1071;Lnet/minecraft/class_1134;)V
      named addEnchantment Lnet/minecraft/item/EnchantedBookItem;addEnchantment(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/EnchantmentLevelEntry;)V
    • getAsItemStack

      public static ItemStack getAsItemStack(EnchantmentLevelEntry enchantmentLevelEntry)
      Mappings:
      Namespace Name Mixin selector
      official a Lahy;a(Laln;)Laip;
      intermediary method_4609 Lnet/minecraft/class_1428;method_4609(Lnet/minecraft/class_1134;)Lnet/minecraft/class_1071;
      named getAsItemStack Lnet/minecraft/item/EnchantedBookItem;getAsItemStack(Lnet/minecraft/enchantment/EnchantmentLevelEntry;)Lnet/minecraft/item/ItemStack;
    • appendToItemGroup

      public void appendToItemGroup(ItemGroup group, DefaultedList<ItemStack> stacks)
      Overrides:
      appendToItemGroup in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lain;a(Lahp;Lfi;)V
      intermediary method_14233 Lnet/minecraft/class_1069;method_14233(Lnet/minecraft/class_1041;Lnet/minecraft/class_3114;)V
      named appendToItemGroup Lnet/minecraft/item/Item;appendToItemGroup(Lnet/minecraft/item/itemgroup/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V