Package net.minecraft.item
Class EnchantedBookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.EnchantedBookItem
- Mappings:
Namespace Name official ziintermediary 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, 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.method_4610(Random random) method_6347(Random random, int int2, int int3, int int4) 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, postProcessNbt, registerBlockItem, setHandheld, setItemGroup, setMaxCount, setMaxDamage, setRecipeRemainder, setStatusEffectString, setTranslationKey, setUnbreakable, setup, shouldRotate, shouldSyncNbtToClient, use
-
Constructor Details
-
EnchantedBookItem
public EnchantedBookItem()- Mappings:
Namespace Name Mixin selector official <init>Lzw;<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 fLzw;f(Lzx;)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 f_Lzw;f_(Lzx;)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 gLzw;g(Lzx;)Laaj;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 hLzi;h(Lzx;)Ldu;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 aLzw;a(Lzx;Lwn;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 aLzi;a(Lzx;Lacl;)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 aLzi;a(Lacl;)Lzx;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 aLzi;a(Laci;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
-
method_4610
- Mappings:
Namespace Name Mixin selector official bLzi;b(Ljava/util/Random;)Lob;intermediary method_4610Lnet/minecraft/class_1428;method_4610(Ljava/util/Random;)Lnet/minecraft/class_847;named method_4610Lnet/minecraft/item/EnchantedBookItem;method_4610(Ljava/util/Random;)Lnet/minecraft/util/WeightedRandomChestContent;
-
method_6347
- Mappings:
Namespace Name Mixin selector official aLzi;a(Ljava/util/Random;III)Lob;intermediary method_6347Lnet/minecraft/class_1428;method_6347(Ljava/util/Random;III)Lnet/minecraft/class_847;named method_6347Lnet/minecraft/item/EnchantedBookItem;method_6347(Ljava/util/Random;III)Lnet/minecraft/util/WeightedRandomChestContent;
-