public class ItemPotion extends Item
Item.ToolMaterialIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>ATTACK_DAMAGE_MODIFIER, ATTACK_SPEED_MODIFIER, bFull3D, canRepair, hasSubtypes, itemRand, maxStackSize, REGISTRYdelegate| Constructor and Description |
|---|
ItemPotion() |
| Modifier and Type | Method and Description |
|---|---|
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
|
ItemStack |
getDefaultInstance() |
java.lang.String |
getItemStackDisplayName(ItemStack stack) |
EnumAction |
getItemUseAction(ItemStack stack)
returns the action that specifies what animation to play when the items is being used
|
int |
getMaxItemUseDuration(ItemStack stack)
How long it takes to use or consume an item
|
void |
getSubItems(Item itemIn,
CreativeTabs tab,
NonNullList<ItemStack> subItems)
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.
|
ActionResult<ItemStack> |
onItemRightClick(World worldIn,
EntityPlayer playerIn,
EnumHand handIn)
Called when the equipped item is right clicked.
|
ItemStack |
onItemUseFinish(ItemStack stack,
World worldIn,
EntityLivingBase entityLiving)
Called when the player finishes using this Item (E.g.
|
addPropertyOverride, canApplyAtEnchantingTable, canDestroyBlockInCreative, canHarvestBlock, canHarvestBlock, canItemEditBlocks, createEntity, doesSneakBypassUse, getAnimationParameters, getArmorModel, getArmorTexture, getAttributeModifiers, getByNameOrId, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDurabilityForDisplay, getEntityLifespan, getFontRenderer, getHarvestLevel, getHasSubtypes, getHighlightTip, getIdFromItem, getIsRepairable, getItemAttributeModifiers, getItemById, getItemEnchantability, getItemEnchantability, getItemFromBlock, getItemStackLimit, getItemStackLimit, getMaxDamage, getMaxDamage, getMetadata, getMetadata, getNBTShareTag, getPropertyGetter, getRarity, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getStrVsBlock, getToolClasses, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasCustomProperties, hitEntity, initCapabilities, isBeaconPayment, isBookEnchantable, isDamageable, isDamaged, isEnchantable, isFull3D, isMap, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockDestroyed, onBlockStartBreak, onCreated, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUse, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, rayTrace, registerItemBlock, registerItems, renderHelmetOverlay, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setUnlocalizedName, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, shouldRotateAroundWhenRendering, showDurabilityBar, updateItemStackNBTgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic ItemStack getDefaultInstance()
getDefaultInstance in class Itempublic ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving)
onItemUseFinish in class Itempublic int getMaxItemUseDuration(ItemStack stack)
getMaxItemUseDuration in class Itempublic EnumAction getItemUseAction(ItemStack stack)
getItemUseAction in class Itempublic ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn)
onItemRightClick in class Itempublic java.lang.String getItemStackDisplayName(ItemStack stack)
getItemStackDisplayName in class Itempublic void addInformation(ItemStack stack, EntityPlayer playerIn, java.util.List<java.lang.String> tooltip, boolean advanced)
addInformation in class Itempublic 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 void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems)
getSubItems in class Item