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_1428
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_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 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
    • 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_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 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;
    • getEnchantmentNbt

      public NbtList getEnchantmentNbt(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official h Lzi;h(Lzx;)Ldu;
      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;
    • 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_3352 Lnet/minecraft/class_1069;method_3352(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;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, EnchantmentLevelEntry info)
      Mappings:
      Namespace Name Mixin selector
      official a Lzi;a(Lzx;Lacl;)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 ItemStack getAsItemStack(EnchantmentLevelEntry info)
      Mappings:
      Namespace Name Mixin selector
      official a Lzi;a(Lacl;)Lzx;
      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;
    • 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_4608 Lnet/minecraft/class_1428;method_4608(Lnet/minecraft/class_1127;Ljava/util/List;)V
      named getEnchantments Lnet/minecraft/item/EnchantedBookItem;getEnchantments(Lnet/minecraft/enchantment/Enchantment;Ljava/util/List;)V
    • method_4610

      public WeightedRandomChestContent method_4610(Random random)
      Mappings:
      Namespace Name Mixin selector
      official b Lzi;b(Ljava/util/Random;)Lob;
      intermediary method_4610 Lnet/minecraft/class_1428;method_4610(Ljava/util/Random;)Lnet/minecraft/class_847;
      named method_4610 Lnet/minecraft/item/EnchantedBookItem;method_4610(Ljava/util/Random;)Lnet/minecraft/util/WeightedRandomChestContent;
    • method_6347

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