Package net.minecraft.item
Class EnchantedBookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem
- All Implemented Interfaces:
Itemable
- Mappings:
Namespace Name official asiintermediary net/minecraft/class_1428named net/minecraft/item/EnchantedBookItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_UUID, ATTACK_SPEED_MODIFIER, BLOCK_ITEMS, itemGroup, RANDOM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEnchantment(ItemStack stack, EnchantmentLevelEntry itemStack) voidappendToItemGroup(ItemGroup group, DefaultedList<ItemStack> stacks) voidappendTooltips(ItemStack stack, World world, List<Text> tooltip, TooltipContext tooltipContext) static ItemStackgetAsItemStack(EnchantmentLevelEntry enchantmentLevelEntry) static NbtListgetEnchantmentNbt(ItemStack stack) booleanhasEnchantmentGlint(ItemStack stack) Returns whether the current item has an enchantment glint.booleanisEnchantable(ItemStack stack) Returns whether the current item can have enchantments.Methods inherited from class net.minecraft.item.Item
addProperty, beforeBlockBreak, byRawId, canAddTo, canRepair, computeTranslationKey, fromBlock, getBlockBreakingSpeed, getDefaultStack, getEnchantability, getItem, getItemGroup, getMaxCount, getMaxDamage, getMaxUseTime, getProperty, getRarity, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasProperties, inventoryTick, isDamageable, isFood, isNetworkSynced, method_13649, method_16075, method_16080, method_3346, method_3353, method_3356, method_3359, method_3367, method_3383, method_6326, onCraft, onEntityHit, onHit, postProcessNbt, registerBlockItem, setup, shouldSyncNbtToClient, useOnBlock
-
Constructor Details
-
EnchantedBookItem
- Mappings:
Namespace Name Mixin selector official <init>Lata;<init>(Lata$a;)Vintermediary <init>Lnet/minecraft/class_1069;<init>(Lnet/minecraft/class_1069$class_3555;)Vnamed <init>Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)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 bLata;b(Late;)Zintermediary method_3374Lnet/minecraft/class_1069;method_3374(Lnet/minecraft/class_1071;)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 aLata;a(Late;)Zintermediary method_3385Lnet/minecraft/class_1069;method_3385(Lnet/minecraft/class_1071;)Znamed isEnchantableLnet/minecraft/item/Item;isEnchantable(Lnet/minecraft/item/ItemStack;)Z
-
getEnchantmentNbt
- Mappings:
Namespace Name Mixin selector official eLasi;e(Late;)Lhe;intermediary method_4611Lnet/minecraft/class_1428;method_4611(Lnet/minecraft/class_1071;)Lnet/minecraft/class_474;named getEnchantmentNbtLnet/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:
appendTooltipsin classItem- Mappings:
Namespace Name Mixin selector official aLata;a(Late;Laxy;Ljava/util/List;Laum;)Vintermediary method_14234Lnet/minecraft/class_1069;method_14234(Lnet/minecraft/class_1071;Lnet/minecraft/class_1150;Ljava/util/List;Lnet/minecraft/class_3191;)Vnamed appendTooltipsLnet/minecraft/item/Item;appendTooltips(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/TooltipContext;)V
-
addEnchantment
- Mappings:
Namespace Name Mixin selector official aLasi;a(Late;Lawh;)Vintermediary method_4607Lnet/minecraft/class_1428;method_4607(Lnet/minecraft/class_1071;Lnet/minecraft/class_1134;)Vnamed addEnchantmentLnet/minecraft/item/EnchantedBookItem;addEnchantment(Lnet/minecraft/item/ItemStack;Lnet/minecraft/enchantment/EnchantmentLevelEntry;)V
-
getAsItemStack
- Mappings:
Namespace Name Mixin selector official aLasi;a(Lawh;)Late;intermediary method_4609Lnet/minecraft/class_1428;method_4609(Lnet/minecraft/class_1134;)Lnet/minecraft/class_1071;named getAsItemStackLnet/minecraft/item/EnchantedBookItem;getAsItemStack(Lnet/minecraft/enchantment/EnchantmentLevelEntry;)Lnet/minecraft/item/ItemStack;
-
appendToItemGroup
- Overrides:
appendToItemGroupin classItem- Mappings:
Namespace Name Mixin selector official aLata;a(Lary;Lez;)Vintermediary method_14233Lnet/minecraft/class_1069;method_14233(Lnet/minecraft/class_1041;Lnet/minecraft/class_3114;)Vnamed appendToItemGroupLnet/minecraft/item/Item;appendToItemGroup(Lnet/minecraft/item/itemgroup/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V
-