Class EnchantedBookItem

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

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

    • EnchantedBookItem

      public EnchantedBookItem()
      Mappings:
      Namespace Name Mixin selector
      official <init> Lzw;<init>()V
      intermediary <init> Lnet/minecraft/class_2054;<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 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
    • 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 f_ Lzw;f_(Lzx;)Z
      intermediary method_8289 Lnet/minecraft/class_2054;method_8289(Lnet/minecraft/class_2056;)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:
      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;
    • getEnchantmentTag

      public ListTag getEnchantmentTag​(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official h Lzi;h(Lzx;)Ldu;
      intermediary method_8225 Lnet/minecraft/class_2039;method_8225(Lnet/minecraft/class_2056;)Lnet/minecraft/class_1411;
      named getEnchantmentTag Lnet/minecraft/item/EnchantedBookItem;getEnchantmentTag(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/nbt/ListTag;
    • appendTooltip

      @Environment(CLIENT) public void appendTooltip​(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced)
      Overrides:
      appendTooltip in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lzw;a(Lzx;Lwn;Ljava/util/List;Z)V
      intermediary method_8265 Lnet/minecraft/class_2054;method_8265(Lnet/minecraft/class_2056;Lnet/minecraft/class_1963;Ljava/util/List;Z)V
      named appendTooltip Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Ljava/util/List;Z)V
    • addEnchantment

      public void addEnchantment​(ItemStack itemStack, EnchantmentInfoEntry info)
      Mappings:
      Namespace Name Mixin selector
      official a Lzi;a(Lzx;Lacl;)V
      intermediary method_8223 Lnet/minecraft/class_2039;method_8223(Lnet/minecraft/class_2056;Lnet/minecraft/class_72;)V
      named addEnchantment Lnet/minecraft/item/EnchantedBookItem;addEnchantment(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/EnchantmentInfoEntry;)V
    • getAsItemStack

      public ItemStack getAsItemStack​(EnchantmentInfoEntry info)
      Mappings:
      Namespace Name Mixin selector
      official a Lzi;a(Lacl;)Lzx;
      intermediary method_8221 Lnet/minecraft/class_2039;method_8221(Lnet/minecraft/class_72;)Lnet/minecraft/class_2056;
      named getAsItemStack Lnet/minecraft/item/EnchantedBookItem;getAsItemStack(Lnet/minecraft/enchantment/EnchantmentInfoEntry;)Lnet/minecraft/item/ItemStack;
    • getEnchantments

      @Environment(CLIENT) public void getEnchantments​(Enchantment enchantment, List<ItemStack> list)
      Mappings:
      Namespace Name Mixin selector
      official a Lzi;a(Laci;Ljava/util/List;)V
      intermediary method_8220 Lnet/minecraft/class_2039;method_8220(Lnet/minecraft/class_64;Ljava/util/List;)V
      named getEnchantments Lnet/minecraft/item/EnchantedBookItem;getEnchantments(Lnet/minecraft/enchantment/Enchantment;Ljava/util/List;)V
    • method_8224

      public WeightedRandomChestContent method_8224​(Random random)
      Mappings:
      Namespace Name Mixin selector
      official b Lzi;b(Ljava/util/Random;)Lob;
      intermediary method_8224 Lnet/minecraft/class_2039;method_8224(Ljava/util/Random;)Lnet/minecraft/class_1715;
      named method_8224 Lnet/minecraft/item/EnchantedBookItem;method_8224(Ljava/util/Random;)Lnet/minecraft/util/WeightedRandomChestContent;
    • method_8222

      public WeightedRandomChestContent method_8222​(Random random, int int2, int int3, int int4)
      Mappings:
      Namespace Name Mixin selector
      official a Lzi;a(Ljava/util/Random;III)Lob;
      intermediary method_8222 Lnet/minecraft/class_2039;method_8222(Ljava/util/Random;III)Lnet/minecraft/class_1715;
      named method_8222 Lnet/minecraft/item/EnchantedBookItem;method_8222(Ljava/util/Random;III)Lnet/minecraft/util/WeightedRandomChestContent;