Package net.minecraft.item
Class EnchantedBookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem
- Mappings:
Namespace Name official ahyintermediary net/minecraft/class_1428named 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, ATTACK_SPEED_MODIFIER, damageable, handheld, maxCount, RANDOM, REGISTRY -
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<String> tooltip, TooltipContext tooltipContext) static ItemStackgetAsItemStack(EnchantmentLevelEntry enchantmentLevelEntry) static NbtListgetEnchantmentNbt(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.Methods inherited from class net.minecraft.item.Item
addProperty, byRawId, canAddTo, canRepair, fromBlock, getBlockBreakingSpeed, getDefaultStack, getDisplayName, getEnchantability, getFromId, getItemGroup, getItemstackTranslatedName, getMaxCount, getMaxDamage, getMaxUseTime, getMeta, getProperty, getRawId, getRecipeRemainder, getTranslationKey, getTranslationKey, getUseAction, hasProperties, hasSubTypes, inventoryTick, isDamageable, isFood, isHandheld, isNetworkSynced, isUnbreakable, method_13649, method_3346, method_3353, method_3356, method_3359, method_3367, method_6326, onCraft, onEntityHit, onHit, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient, use
-
Constructor Details
-
EnchantedBookItem
public EnchantedBookItem()- Mappings:
Namespace Name Mixin selector official <init>Lain;<init>()Vintermediary <init>Lnet/minecraft/class_1069;<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 f_Lain;f_(Laip;)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 g_Lain;g_(Laip;)Zintermediary method_3385Lnet/minecraft/class_1069;method_3385(Lnet/minecraft/class_1071;)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.GoldenAppleItemPotionItem
- Mappings:
Namespace Name Mixin selector official gLain;g(Laip;)Laje;intermediary method_3377Lnet/minecraft/class_1069;method_3377(Lnet/minecraft/class_1071;)Lnet/minecraft/class_1081;named getRarityLnet/minecraft/item/Item;getRarity(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Rarity;
-
getEnchantmentNbt
- Mappings:
Namespace Name Mixin selector official hLahy;h(Laip;)Lge;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<String> tooltip, TooltipContext tooltipContext) - Overrides:
appendTooltipsin classItem- Mappings:
Namespace Name Mixin selector official aLain;a(Laip;Lamu;Ljava/util/List;Lakb;)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 aLahy;a(Laip;Laln;)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 aLahy;a(Laln;)Laip;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 aLain;a(Lahp;Lfi;)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
-