Package net.minecraft.item
Class WrittenBookItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.WrittenBookItem
- All Implemented Interfaces:
ItemConvertible
public class WrittenBookItem extends Item
-
Nested Class Summary
-
Field Summary
Fields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group, RANDOM -
Constructor Summary
Constructors Constructor Description WrittenBookItem(Item.Settings settings) -
Method Summary
Modifier and Type Method Description voidappendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context)static intgetGeneration(ItemStack stack)TextgetName(ItemStack stack)static intgetPageCount(ItemStack stack)booleanhasEnchantmentGlint(ItemStack stack)static booleanisValid(CompoundTag tag)static booleanresolve(ItemStack book, ServerCommandSource commandSource, PlayerEntity player)TypedActionResult<ItemStack>use(World world, PlayerEntity user, Hand hand)ActionResultuseOnBlock(ItemUsageContext context)Methods inherited from class net.minecraft.item.Item
appendStacks, asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDrinkSound, getEatSound, getEnchantability, getFoodComponent, getGroup, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getStackForRender, getTranslationKey, getTranslationKey, getUseAction, hasRecipeRemainder, inventoryTick, isDamageable, isEffectiveOn, isEnchantable, isFireproof, isFood, isIn, isIn, isNetworkSynced, isUsedOnRelease, onCraft, onStoppedUsing, postHit, postMine, postProcessTag, rayTrace, shouldSyncTagToClient, toString, usageTick, useOnEntity
-
Constructor Details
-
Method Details
-
isValid
-
getGeneration
-
getPageCount
-
getName
-
appendTooltip
@Environment(CLIENT) public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)- Overrides:
appendTooltipin classItem
-
useOnBlock
- Overrides:
useOnBlockin classItem
-
use
-
resolve
public static boolean resolve(ItemStack book, @Nullable ServerCommandSource commandSource, @Nullable PlayerEntity player) -
hasEnchantmentGlint
- Overrides:
hasEnchantmentGlintin classItem
-