Class EnchantedBookItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem
All Implemented Interfaces:
Itemable

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

    • EnchantedBookItem

      public EnchantedBookItem(Item.Settings settings)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lata;<init>(Lata$a;)V
      intermediary <init> Lnet/minecraft/class_1069;<init>(Lnet/minecraft/class_1069$class_3555;)V
      named <init> Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)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 b Lata;b(Late;)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 a Lata;a(Late;)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
    • getEnchantmentNbt

      public static NbtList getEnchantmentNbt(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official e Lasi;e(Late;)Lhe;
      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<Text> tooltip, TooltipContext tooltipContext)
      Overrides:
      appendTooltips in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lata;a(Late;Laxy;Ljava/util/List;Laum;)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 Lasi;a(Late;Lawh;)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 Lasi;a(Lawh;)Late;
      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 Lata;a(Lary;Lez;)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