public class WrittenBookItem extends Item
Item.Properties
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, random
delegate
コンストラクタと説明 |
---|
WrittenBookItem(Item.Properties builder) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addInformation(ItemStack stack,
World worldIn,
java.util.List<ITextComponent> tooltip,
ITooltipFlag flagIn)
allows items to add custom lines of information to the mouseover description
|
static int |
func_220049_j(ItemStack p_220049_0_) |
ITextComponent |
getDisplayName(ItemStack stack) |
static int |
getGeneration(ItemStack book)
Gets the generation of the book (how many times it has been cloned)
|
boolean |
hasEffect(ItemStack stack)
Returns true if this item has an enchantment glint.
|
ActionResult<ItemStack> |
onItemRightClick(World worldIn,
PlayerEntity playerIn,
Hand handIn)
Called to trigger the item's "innate" right click behavior.
|
ActionResultType |
onItemUse(ItemUseContext context)
Called when this item is used when targetting a Block
|
static boolean |
resolveContents(ItemStack stack,
CommandSource resolvingSource,
PlayerEntity resolvingPlayer) |
static boolean |
validBookTagContents(CompoundNBT nbt) |
addPropertyOverride, asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, fillItemGroup, func_219972_a, func_225519_S__, func_225520_U__, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getFood, getGroup, getHarvestLevel, getIdFromItem, getIsRepairable, getItemById, getItemEnchantability, getItemFromBlock, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getPropertyGetter, getRarity, getTags, getToolTypes, getTranslationKey, getTranslationKey, getUseAction, getUseDuration, hasContainerItem, hasCustomProperties, hitEntity, inventoryTick, isComplex, isCrossbow, isDamageable, isEnchantable, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemUseFinish, onPlayerStoppedUsing, rayTrace, shouldSyncTag, toString, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamaged, isShield, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
public WrittenBookItem(Item.Properties builder)
public static boolean validBookTagContents(@Nullable CompoundNBT nbt)
public static int getGeneration(ItemStack book)
public static int func_220049_j(ItemStack p_220049_0_)
public ITextComponent getDisplayName(ItemStack stack)
getDisplayName
クラス内 Item
public void addInformation(ItemStack stack, @Nullable World worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
addInformation
クラス内 Item
public ActionResultType onItemUse(ItemUseContext context)
public ActionResult<ItemStack> onItemRightClick(World worldIn, PlayerEntity playerIn, Hand handIn)
onItemUse(net.minecraft.item.ItemUseContext)
.onItemRightClick
クラス内 Item
public static boolean resolveContents(ItemStack stack, @Nullable CommandSource resolvingSource, @Nullable PlayerEntity resolvingPlayer)
public boolean hasEffect(ItemStack stack)
stack.isItemEnchanted()
,
but other items can override it (for instance, written books always return true).
Note that if you override this method, you generally want to also call the super version (on Item
) to get
the glint for enchanted items. Of course, that is unnecessary if the overwritten version always returns true.