Package net.minecraft.item
Class EnchantedBookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem
- Mappings:
Namespace Name official aesintermediary 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 TypeMethodDescriptionvoidaddEnchantment(ItemStack itemStack, EnchantmentLevelEntry info) voidappendTooltip(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced) getEnchantmentNbt(ItemStack itemStack) voidgetEnchantments(Enchantment enchantment, List<ItemStack> list) 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, 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_13648, 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>Lafh;<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_Lafh;f_(Lafj;)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_Lafh;g_(Lafj;)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 gLafh;g(Lafj;)Lafx;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 hLaes;h(Lafj;)Lea;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;
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, PlayerEntity player, List<String> lines, boolean advanced) - Overrides:
appendTooltipin classItem- Mappings:
Namespace Name Mixin selector official aLafh;a(Lafj;Laay;Ljava/util/List;Z)Vintermediary method_3352Lnet/minecraft/class_1069;method_3352(Lnet/minecraft/class_1071;Lnet/minecraft/class_988;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 aLaes;a(Lafj;Lail;)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 aLaes;a(Lail;)Lafj;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;
-
getEnchantments
- Mappings:
Namespace Name Mixin selector official aLaes;a(Laii;Ljava/util/List;)Vintermediary method_4608Lnet/minecraft/class_1428;method_4608(Lnet/minecraft/class_1127;Ljava/util/List;)Vnamed getEnchantmentsLnet/minecraft/item/EnchantedBookItem;getEnchantments(Lnet/minecraft/enchantment/Enchantment;Ljava/util/List;)V
-