public class EnchantedBookItem extends Item
Item.Properties
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, BLOCK_TO_ITEM, canRepair, group, properties, random
delegate
コンストラクタと説明 |
---|
EnchantedBookItem(Item.Properties builder) |
修飾子とタイプ | メソッドと説明 |
---|---|
static void |
addEnchantment(ItemStack p_92115_0_,
EnchantmentData stack)
Adds an stored enchantment to an enchanted book ItemStack
|
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
|
void |
fillItemGroup(ItemGroup group,
NonNullList<ItemStack> items)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
static ItemStack |
getEnchantedItemStack(EnchantmentData p_92111_0_)
Returns the ItemStack of an enchanted version of this item.
|
static ListNBT |
getEnchantments(ItemStack stack) |
boolean |
hasEffect(ItemStack stack)
Returns true if this item has an enchantment glint.
|
boolean |
isEnchantable(ItemStack stack)
Checks isDamagable and if it cannot be stacked
|
addPropertyOverride, asItem, canHarvestBlock, canPlayerBreakBlockWhileHolding, func_219972_a, func_225519_S__, func_225520_U__, getAttributeModifiers, getContainerItem, getDefaultInstance, getDefaultTranslationKey, getDestroySpeed, getDisplayName, 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, isFood, isIn, isInGroup, isRepairable, itemInteractionForEntity, onBlockDestroyed, onCreated, onItemRightClick, onItemUse, 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 EnchantedBookItem(Item.Properties builder)
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.public boolean isEnchantable(ItemStack stack)
isEnchantable
クラス内 Item
public void addInformation(ItemStack stack, @Nullable World worldIn, java.util.List<ITextComponent> tooltip, ITooltipFlag flagIn)
addInformation
クラス内 Item
public static void addEnchantment(ItemStack p_92115_0_, EnchantmentData stack)
public static ItemStack getEnchantedItemStack(EnchantmentData p_92111_0_)
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> items)
fillItemGroup
クラス内 Item