Package net.minecraft.item
Class EnchantedBookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem
public class EnchantedBookItem extends Item
- Mappings:
Namespace Name official ziintermediary net/minecraft/class_2039named net/minecraft/item/EnchantedBookItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.ToolMaterialType -
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, damageable, handheld, maxCount, RANDOM, REGISTRY -
Constructor Summary
Constructors Constructor Description EnchantedBookItem() -
Method Summary
Modifier and Type Method Description voidaddEnchantment(ItemStack itemStack, EnchantmentInfoEntry info)voidappendTooltip(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced)ItemStackgetAsItemStack(EnchantmentInfoEntry info)voidgetEnchantments(Enchantment enchantment, List<ItemStack> list)ListTaggetEnchantmentTag(ItemStack itemStack)RaritygetRarity(ItemStack stack)Returns the rarity of the current Item.booleanhasEnchantmentGlint(ItemStack stack)Returns whether the current item has an enchantment glint.booleanisEnchantable(ItemStack stack)Returns whether the current item can have enchantments.WeightedRandomChestContentmethod_8222(Random random, int int2, int int3, int int4)WeightedRandomChestContentmethod_8224(Random random)Methods inherited from class net.minecraft.item.Item
appendItemStacks, byRawId, canRepair, canUseOnEntity, fromBlock, getAttributeModifierMap, getDisplayColor, getDisplayName, getEnchantability, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getMiningSpeedMultiplier, getRawId, getRecipeRemainder, getStatusEffectString, getTranslationKey, getTranslationKey, getUseAction, hasStatusEffectString, hasSubTypes, inventoryTick, isDamageable, isEffectiveOn, isFood, isHandheld, isNetworkSynced, isUnbreakable, onBlockBroken, onCraft, onEntityHit, onFinishUse, onHit, onStartUse, onUseStopped, postProcessTag, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncTagToClient, use
-
Constructor Details
-
EnchantedBookItem
public EnchantedBookItem()- Mappings:
Namespace Name Mixin selector official <init>Lzw;<init>()Vintermediary <init>Lnet/minecraft/class_2054;<init>()Vnamed <init>Lnet/minecraft/item/Item;<init>()V
-
-
Method Details
-
hasEnchantmentGlint
Returns whether the current item has an enchantment glint. Used by enchanted golden apples and enchanted items.- Overrides:
hasEnchantmentGlintin classItem- See Also:
net.minecraft.item.GoldenAppleItem- Mappings:
Namespace Name Mixin selector official fLzw;f(Lzx;)Zintermediary method_8288Lnet/minecraft/class_2054;method_8288(Lnet/minecraft/class_2056;)Znamed hasEnchantmentGlintLnet/minecraft/item/Item;hasEnchantmentGlint(Lnet/minecraft/item/ItemStack;)Z
-
isEnchantable
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:
isEnchantablein classItem- Mappings:
Namespace Name Mixin selector official f_Lzw;f_(Lzx;)Zintermediary method_8289Lnet/minecraft/class_2054;method_8289(Lnet/minecraft/class_2056;)Znamed isEnchantableLnet/minecraft/item/Item;isEnchantable(Lnet/minecraft/item/ItemStack;)Z
-
getRarity
Returns the rarity of the current Item. Used by golden apples, enchanted items and potions.- Overrides:
getRarityin classItem- 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 gLzw;g(Lzx;)Laaj;intermediary method_8290Lnet/minecraft/class_2054;method_8290(Lnet/minecraft/class_2056;)Lnet/minecraft/class_12;named getRarityLnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
-
getEnchantmentTag
- Mappings:
Namespace Name Mixin selector official hLzi;h(Lzx;)Ldu;intermediary method_8225Lnet/minecraft/class_2039;method_8225(Lnet/minecraft/class_2056;)Lnet/minecraft/class_1411;named getEnchantmentTagLnet/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:
appendTooltipin classItem- Mappings:
Namespace Name Mixin selector official aLzw;a(Lzx;Lwn;Ljava/util/List;Z)Vintermediary method_8265Lnet/minecraft/class_2054;method_8265(Lnet/minecraft/class_2056;Lnet/minecraft/class_1963;Ljava/util/List;Z)Vnamed appendTooltipLnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;Ljava/util/List;Z)V
-
addEnchantment
- Mappings:
Namespace Name Mixin selector official aLzi;a(Lzx;Lacl;)Vintermediary method_8223Lnet/minecraft/class_2039;method_8223(Lnet/minecraft/class_2056;Lnet/minecraft/class_72;)Vnamed addEnchantmentLnet/minecraft/item/EnchantedBookItem;addEnchantment(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/EnchantmentInfoEntry;)V
-
getAsItemStack
- Mappings:
Namespace Name Mixin selector official aLzi;a(Lacl;)Lzx;intermediary method_8221Lnet/minecraft/class_2039;method_8221(Lnet/minecraft/class_72;)Lnet/minecraft/class_2056;named getAsItemStackLnet/minecraft/item/EnchantedBookItem;getAsItemStack(Lnet/minecraft/enchantment/EnchantmentInfoEntry;)Lnet/minecraft/item/ItemStack;
-
getEnchantments
- Mappings:
Namespace Name Mixin selector official aLzi;a(Laci;Ljava/util/List;)Vintermediary method_8220Lnet/minecraft/class_2039;method_8220(Lnet/minecraft/class_64;Ljava/util/List;)Vnamed getEnchantmentsLnet/minecraft/item/EnchantedBookItem;getEnchantments(Lnet/minecraft/enchantment/Enchantment;Ljava/util/List;)V
-
method_8224
- Mappings:
Namespace Name Mixin selector official bLzi;b(Ljava/util/Random;)Lob;intermediary method_8224Lnet/minecraft/class_2039;method_8224(Ljava/util/Random;)Lnet/minecraft/class_1715;named method_8224Lnet/minecraft/item/EnchantedBookItem;method_8224(Ljava/util/Random;)Lnet/minecraft/util/WeightedRandomChestContent;
-
method_8222
- Mappings:
Namespace Name Mixin selector official aLzi;a(Ljava/util/Random;III)Lob;intermediary method_8222Lnet/minecraft/class_2039;method_8222(Ljava/util/Random;III)Lnet/minecraft/class_1715;named method_8222Lnet/minecraft/item/EnchantedBookItem;method_8222(Ljava/util/Random;III)Lnet/minecraft/util/WeightedRandomChestContent;
-