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 |
---|---|
void |
addEnchantment(ItemStack stack,
EnchantmentData enchantment)
Adds an stored enchantment to an enchanted book ItemStack
|
void |
addInformation(ItemStack stack,
EntityPlayer playerIn,
java.util.List<java.lang.String> tooltip,
boolean advanced)
allows items to add custom lines of information to the mouseover description
|
void |
getAll(Enchantment enchantment,
java.util.List<ItemStack> list) |
ItemStack |
getEnchantedItemStack(EnchantmentData data)
Returns the ItemStack of an enchanted version of this item.
|
NBTTagList |
getEnchantments(ItemStack stack) |
EnumRarity |
getRarity(ItemStack stack)
Return an item rarity from EnumRarity
|
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, canDestroyBlockInCreative, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDefaultInstance, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getStrVsBlock, getSubItems, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isFull3D, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFinish, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, 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 NBTTagList getEnchantments(ItemStack stack)
public void addInformation(ItemStack stack, EntityPlayer playerIn, java.util.List<java.lang.String> tooltip, boolean advanced)
addInformation
in class Item
public void addEnchantment(ItemStack stack, EnchantmentData enchantment)
public ItemStack getEnchantedItemStack(EnchantmentData data)
public void getAll(Enchantment enchantment, java.util.List<ItemStack> list)