public class ItemEnchantedBook extends Item
Item.ToolMaterial
IForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>
ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRY
delegate
Constructor and Description |
---|
ItemEnchantedBook() |
Modifier and Type | Method and Description |
---|---|
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<java.lang.String> tooltip,
ITooltipFlag flagIn)
allows items to add custom lines of information to the mouseover description
|
static ItemStack |
getEnchantedItemStack(EnchantmentData p_92111_0_)
Returns the ItemStack of an enchanted version of this item.
|
static NBTTagList |
getEnchantments(ItemStack p_92110_0_) |
EnumRarity |
getRarity(ItemStack stack)
Return an item rarity from EnumRarity
|
void |
getSubItems(CreativeTabs tab,
NonNullList<ItemStack> items)
returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
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, canApplyAtEnchantingTable, canContinueUsing, canDestroyBlockInCreative, canDisableShield, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getCreatorModId, getDamage, getDefaultInstance, getDestroySpeed, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getForgeRarity, getHarvestLevel, getHasSubtypes, getHighlightTip, getHorseArmorTexture, getHorseArmorType, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemBurnTime, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getTileEntityItemStackRenderer, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, getXpRepairRatio, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isInCreativeTab, isMap, isRepairable, isShield, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, readNBTShareTag, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setTileEntityItemStackRenderer, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBT
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
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
in class Item
public EnumRarity getRarity(ItemStack stack)
public static NBTTagList getEnchantments(ItemStack p_92110_0_)
public void addInformation(ItemStack stack, World worldIn, java.util.List<java.lang.String> tooltip, ITooltipFlag flagIn)
addInformation
in class Item
public static void addEnchantment(ItemStack p_92115_0_, EnchantmentData stack)
public static ItemStack getEnchantedItemStack(EnchantmentData p_92111_0_)
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items)
getSubItems
in class Item