Package net.minecraft.world.item
Class WrittenBookItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.WrittenBookItem
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IForgeItem
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final int
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appendHoverText
(ItemStack p_43457_, Level p_43458_, List<Component> p_43459_, TooltipFlag p_43460_) static int
getGeneration
(ItemStack p_43474_) static int
getPageCount
(ItemStack p_43478_) boolean
static boolean
makeSureTagIsValid
(CompoundTag p_43472_) static boolean
resolveBookComponents
(ItemStack p_43462_, CommandSourceStack p_43463_, Player p_43464_) private static String
resolvePage
(CommandSourceStack p_151249_, Player p_151250_, String p_151251_) use
(Level p_43468_, Player p_43469_, InteractionHand p_43470_) useOn
(UseOnContext p_43466_) Methods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOnRelease, verifyTagAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
TITLE_LENGTH
public static final int TITLE_LENGTH- See Also:
-
TITLE_MAX_LENGTH
public static final int TITLE_MAX_LENGTH- See Also:
-
PAGE_EDIT_LENGTH
public static final int PAGE_EDIT_LENGTH- See Also:
-
PAGE_LENGTH
public static final int PAGE_LENGTH- See Also:
-
MAX_PAGES
public static final int MAX_PAGES- See Also:
-
MAX_GENERATION
public static final int MAX_GENERATION- See Also:
-
TAG_TITLE
- See Also:
-
TAG_FILTERED_TITLE
- See Also:
-
TAG_AUTHOR
- See Also:
-
TAG_PAGES
- See Also:
-
TAG_FILTERED_PAGES
- See Also:
-
TAG_GENERATION
- See Also:
-
TAG_RESOLVED
- See Also:
-
-
Constructor Details
-
WrittenBookItem
-
-
Method Details
-
makeSureTagIsValid
-
getGeneration
-
getPageCount
-
getName
-
appendHoverText
public void appendHoverText(ItemStack p_43457_, @Nullable Level p_43458_, List<Component> p_43459_, TooltipFlag p_43460_) - Overrides:
appendHoverText
in classItem
-
useOn
-
use
public InteractionResultHolder<ItemStack> use(Level p_43468_, Player p_43469_, InteractionHand p_43470_) -
resolveBookComponents
public static boolean resolveBookComponents(ItemStack p_43462_, @Nullable CommandSourceStack p_43463_, @Nullable Player p_43464_) -
resolvePage
private static String resolvePage(@Nullable CommandSourceStack p_151249_, @Nullable Player p_151250_, String p_151251_) -
isFoil
-