Package net.minecraft.item
Class BookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.BookItem
public class BookItem extends Item
- Mappings:
Namespace Name official yrintermediary net/minecraft/class_2021named net/minecraft/item/BookItem
-
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 BookItem() -
Method Summary
Modifier and Type Method Description intgetEnchantability()Returns the enchantability of an Item.booleanisEnchantable(ItemStack stack)Returns whether the current item can have enchantments.Methods inherited from class net.minecraft.item.Item
appendItemStacks, appendTooltip, byRawId, canRepair, canUseOnEntity, fromBlock, getAttributeModifierMap, getDisplayColor, getDisplayName, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getMiningSpeedMultiplier, getRarity, getRawId, getRecipeRemainder, getStatusEffectString, getTranslationKey, getTranslationKey, getUseAction, hasEnchantmentGlint, 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
-
BookItem
public BookItem()- 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
-
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
-
getEnchantability
public int getEnchantability()Returns the enchantability of an Item. Used by tools and armor- Overrides:
getEnchantabilityin classItem- Returns:
- Enchantability
- See Also:
ToolItem,ArmorItem- Mappings:
Namespace Name Mixin selector official bLzw;b()Iintermediary method_8269Lnet/minecraft/class_2054;method_8269()Inamed getEnchantabilityLnet/minecraft/item/Item;getEnchantability()I
-