public class Item extends Object
Constructor and Description |
---|
Item(int par1) |
Modifier and Type | Method and Description |
---|---|
void |
addInformation(ItemStack par1ItemStack,
EntityPlayer par2EntityPlayer,
List par3List,
boolean par4) |
boolean |
canHarvestBlock(Block par1Block)
Returns if the item (tool) can harvest results from the block type.
|
boolean |
canHarvestBlock(Block par1Block,
ItemStack itemStack)
ItemStack sensitive version of
canHarvestBlock(Block) |
boolean |
canItemEditBlocks()
Returns true if players can use this item to affect the world (e.g.
|
Entity |
createEntity(World world,
Entity location,
ItemStack itemstack)
This function should return a new entity to replace the dropped item.
|
boolean |
doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack)
If this returns true, after a recipe involving this item is crafted the container item will be added to the
player's inventory instead of remaining in the crafting grid.
|
ModelBiped |
getArmorModel(EntityLivingBase entityLiving,
ItemStack itemStack,
int armorSlot)
Override this method to have an item handle its own armor rendering.
|
String |
getArmorTexture(ItemStack stack,
Entity entity,
int slot,
int layer)
Deprecated.
|
String |
getArmorTexture(ItemStack stack,
Entity entity,
int slot,
String type)
Called by RenderBiped and RenderPlayer to determine the armor texture that
should be use for the currently equiped item.
|
WeightedRandomChestContent |
getChestGenBase(ChestGenHooks chest,
Random rnd,
WeightedRandomChestContent original)
Generates the base Random item for a specific instance of the chest gen,
Enchanted books use this to pick a random enchantment.
|
int |
getColorFromItemStack(ItemStack par1ItemStack,
int par2) |
Item |
getContainerItem() |
ItemStack |
getContainerItemStack(ItemStack itemStack)
ItemStack sensitive version of getContainerItem.
|
CreativeTabs |
getCreativeTab() |
CreativeTabs[] |
getCreativeTabs()
Gets a list of tabs that items belonging to this class can display on,
combined properly with getSubItems allows for a single item to span
many sub-items across many tabs.
|
int |
getDamage(ItemStack stack)
Return the itemDamage represented by this ItemStack.
|
float |
getDamageVsEntity(Entity par1Entity,
ItemStack itemStack)
Deprecated.
|
int |
getDisplayDamage(ItemStack stack)
Return the itemDamage display value represented by this itemstack.
|
int |
getEntityLifespan(ItemStack itemStack,
World world)
Retrieves the normal 'lifespan' of this item when it is dropped on the ground as a EntityItem.
|
FontRenderer |
getFontRenderer(ItemStack stack)
Returns the font renderer used to render tooltips and overlays for this item.
|
boolean |
getHasSubtypes() |
Icon |
getIcon(ItemStack stack,
int pass)
Return the correct icon for rendering based on the supplied ItemStack and render pass.
|
Icon |
getIcon(ItemStack stack,
int renderPass,
EntityPlayer player,
ItemStack usingItem,
int useRemaining)
Player, Render pass, and item usage sensitive version of getIconIndex.
|
Icon |
getIconFromDamage(int par1) |
Icon |
getIconFromDamageForRenderPass(int par1,
int par2) |
Icon |
getIconIndex(ItemStack par1ItemStack) |
boolean |
getIsRepairable(ItemStack par1ItemStack,
ItemStack par2ItemStack)
Return whether this item is repairable in an anvil.
|
com.google.common.collect.Multimap |
getItemAttributeModifiers()
Gets a map of item attribute modifiers, used by ItemSword to increase hit damage.
|
String |
getItemDisplayName(ItemStack par1ItemStack) |
int |
getItemEnchantability()
Return the enchantability factor of the item, most of the time is based on material.
|
String |
getItemStackDisplayName(ItemStack par1ItemStack) |
int |
getItemStackLimit()
Returns the maximum size of the stack for a specific item.
|
EnumAction |
getItemUseAction(ItemStack par1ItemStack)
returns the action that specifies what animation to play when the items is being used
|
int |
getMaxDamage()
Returns the maximum damage an item can take.
|
int |
getMaxDamage(ItemStack stack)
Return the maxDamage for this ItemStack.
|
int |
getMaxItemUseDuration(ItemStack par1ItemStack)
How long it takes to use or consume an item
|
int |
getMetadata(int par1)
Returns the metadata of the block which this Item (ItemBlock) can place
|
String |
getPotionEffect()
Returns a string representing what this item does to a potion.
|
String |
getPotionEffect(ItemStack stack)
ItemStack sensitive version of getPotionEffect
|
EnumRarity |
getRarity(ItemStack par1ItemStack) |
int |
getRenderPasses(int metadata)
Returns the number of render passes/layers this item has.
|
boolean |
getShareTag()
If this function returns true (or the item is damageable), the ItemStack's NBT tag will be sent to the client.
|
float |
getSmeltingExperience(ItemStack item)
Determines the base experience for a player when they remove this item from a furnace slot.
|
int |
getSpriteNumber() |
String |
getStatName() |
float |
getStrVsBlock(ItemStack par1ItemStack,
Block par2Block)
Returns the strength of the stack against a given block.
|
float |
getStrVsBlock(ItemStack itemstack,
Block block,
int metadata)
Metadata-sensitive version of getStrVsBlock
|
void |
getSubItems(int par1,
CreativeTabs par2CreativeTabs,
List par3List) |
String |
getUnlocalizedName()
Returns the unlocalized name of this item.
|
String |
getUnlocalizedName(ItemStack par1ItemStack)
Returns the unlocalized name of this item.
|
String |
getUnlocalizedNameInefficiently(ItemStack par1ItemStack)
Translates the unlocalized name of this item, but without the .name suffix, so the translation fails and the
unlocalized name itself is returned.
|
boolean |
hasContainerItem()
True if this Item has a container item (a.k.a.
|
boolean |
hasCustomEntity(ItemStack stack)
Determines if this Item has a special entity for when they are in the world.
|
boolean |
hasEffect(ItemStack par1ItemStack)
Deprecated.
|
boolean |
hasEffect(ItemStack par1ItemStack,
int pass)
Render Pass sensitive version of hasEffect()
|
boolean |
hitEntity(ItemStack par1ItemStack,
EntityLivingBase par2EntityLivingBase,
EntityLivingBase par3EntityLivingBase)
Current implementations of this method in child classes do not use the entry argument beside ev.
|
boolean |
isBookEnchantable(ItemStack itemstack1,
ItemStack itemstack2)
Allow or forbid the specific book/item combination as an anvil enchant
|
boolean |
isDamageable() |
boolean |
isDamaged(ItemStack stack)
Return if this itemstack is damaged.
|
boolean |
isFull3D() |
boolean |
isItemTool(ItemStack par1ItemStack)
Checks isDamagable and if it cannot be stacked
|
boolean |
isMap()
false for all Items except sub-classes of ItemMapBase
|
boolean |
isPotionIngredient()
Returns true if this item serves as a potion ingredient (its ingredient information is not null).
|
boolean |
isPotionIngredient(ItemStack stack)
ItemStack sensitive version of isPotionIngredient
|
boolean |
isRepairable()
Called by CraftingManager to determine if an item is reparable.
|
boolean |
isValidArmor(ItemStack stack,
int armorType,
Entity entity)
Determines if the specific ItemStack can be placed in the specified armor slot.
|
boolean |
itemInteractionForEntity(ItemStack par1ItemStack,
EntityPlayer par2EntityPlayer,
EntityLivingBase par3EntityLivingBase)
Returns true if the item can be used on the given entity, e.g.
|
void |
onArmorTickUpdate(World world,
EntityPlayer player,
ItemStack itemStack)
Called to tick armor in the armor slot.
|
boolean |
onBlockDestroyed(ItemStack par1ItemStack,
World par2World,
int par3,
int par4,
int par5,
int par6,
EntityLivingBase par7EntityLivingBase) |
boolean |
onBlockStartBreak(ItemStack itemstack,
int X,
int Y,
int Z,
EntityPlayer player)
Called before a block is broken.
|
void |
onCreated(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer)
Called when item is crafted/smelted.
|
boolean |
onDroppedByPlayer(ItemStack item,
EntityPlayer player)
Called when a player drops the item into the world,
returning false from this will prevent the item from
being removed from the players inventory and spawning
in the world
|
ItemStack |
onEaten(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer) |
boolean |
onEntityItemUpdate(EntityItem entityItem)
Called by the default implemetation of EntityItem's onUpdate method, allowing for cleaner
control over the update of the item without having to write a subclass.
|
boolean |
onEntitySwing(EntityLivingBase entityLiving,
ItemStack stack)
Called when a entity tries to play the 'swing' animation.
|
ItemStack |
onItemRightClick(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer)
Called whenever this item is equipped and the right mouse button is pressed.
|
boolean |
onItemUse(ItemStack par1ItemStack,
EntityPlayer par2EntityPlayer,
World par3World,
int par4,
int par5,
int par6,
int par7,
float par8,
float par9,
float par10)
Callback for item usage.
|
boolean |
onItemUseFirst(ItemStack stack,
EntityPlayer player,
World world,
int x,
int y,
int z,
int side,
float hitX,
float hitY,
float hitZ)
This is called when the item is used, before the block is activated.
|
boolean |
onLeftClickEntity(ItemStack stack,
EntityPlayer player,
Entity entity)
Called when the player Left Clicks (attacks) an entity.
|
void |
onPlayerStoppedUsing(ItemStack par1ItemStack,
World par2World,
EntityPlayer par3EntityPlayer,
int par4)
called when the player releases the use item button.
|
void |
onUpdate(ItemStack par1ItemStack,
World par2World,
Entity par3Entity,
int par4,
boolean par5)
Called each tick as long the item is on a player inventory.
|
void |
onUsingItemTick(ItemStack stack,
EntityPlayer player,
int count)
Called each tick while using an item.
|
void |
registerIcons(IconRegister par1IconRegister) |
void |
renderHelmetOverlay(ItemStack stack,
EntityPlayer player,
ScaledResolution resolution,
float partialTicks,
boolean hasScreen,
int mouseX,
int mouseY)
Called when the client starts rendering the HUD, for whatever item the player currently has as a helmet.
|
boolean |
requiresMultipleRenderPasses() |
Item |
setContainerItem(Item par1Item) |
Item |
setCreativeTab(CreativeTabs par1CreativeTabs)
returns this;
|
void |
setDamage(ItemStack stack,
int damage)
Set the damage for this itemstack.
|
Item |
setFull3D()
Sets bFull3D to True and return the object.
|
Item |
setMaxDamage(int par1)
set max damage of an Item
|
Item |
setMaxStackSize(int par1) |
Item |
setNoRepair()
Call to disable repair recipes.
|
Item |
setPotionEffect(String par1Str)
Sets the string representing this item's effect on a potion when used as an ingredient.
|
Item |
setTextureName(String par1Str) |
Item |
setUnlocalizedName(String par1Str)
Sets the unlocalized name of this item to the string passed as the parameter, prefixed by "item."
|
boolean |
shouldPassSneakingClickToBlock(World par2World,
int par4,
int par5,
int par6)
Should this item, when held, allow sneak-clicks to pass through to the underlying block?
|
boolean |
shouldRotateAroundWhenRendering() |
public static Item[] itemsList
public static Item shovelIron
public static Item pickaxeIron
public static Item axeIron
public static Item flintAndSteel
public static Item appleRed
public static ItemBow bow
public static Item arrow
public static Item coal
public static Item diamond
public static Item ingotIron
public static Item ingotGold
public static Item swordIron
public static Item swordWood
public static Item shovelWood
public static Item pickaxeWood
public static Item axeWood
public static Item swordStone
public static Item shovelStone
public static Item pickaxeStone
public static Item axeStone
public static Item swordDiamond
public static Item shovelDiamond
public static Item pickaxeDiamond
public static Item axeDiamond
public static Item stick
public static Item bowlEmpty
public static Item bowlSoup
public static Item swordGold
public static Item shovelGold
public static Item pickaxeGold
public static Item axeGold
public static Item silk
public static Item feather
public static Item gunpowder
public static Item hoeWood
public static Item hoeStone
public static Item hoeIron
public static Item hoeDiamond
public static Item hoeGold
public static Item seeds
public static Item wheat
public static Item bread
public static ItemArmor helmetLeather
public static ItemArmor plateLeather
public static ItemArmor legsLeather
public static ItemArmor bootsLeather
public static ItemArmor helmetChain
public static ItemArmor plateChain
public static ItemArmor legsChain
public static ItemArmor bootsChain
public static ItemArmor helmetIron
public static ItemArmor plateIron
public static ItemArmor legsIron
public static ItemArmor bootsIron
public static ItemArmor helmetDiamond
public static ItemArmor plateDiamond
public static ItemArmor legsDiamond
public static ItemArmor bootsDiamond
public static ItemArmor helmetGold
public static ItemArmor plateGold
public static ItemArmor legsGold
public static ItemArmor bootsGold
public static Item flint
public static Item porkRaw
public static Item porkCooked
public static Item painting
public static Item appleGold
public static Item sign
public static Item doorWood
public static Item bucketEmpty
public static Item bucketWater
public static Item bucketLava
public static Item minecartEmpty
public static Item saddle
public static Item doorIron
public static Item redstone
public static Item snowball
public static Item boat
public static Item leather
public static Item bucketMilk
public static Item brick
public static Item clay
public static Item reed
public static Item paper
public static Item book
public static Item slimeBall
public static Item minecartCrate
public static Item minecartPowered
public static Item egg
public static Item compass
public static ItemFishingRod fishingRod
public static Item pocketSundial
public static Item glowstone
public static Item fishRaw
public static Item fishCooked
public static Item dyePowder
public static Item bone
public static Item sugar
public static Item cake
public static Item bed
public static Item redstoneRepeater
public static Item cookie
public static ItemMap map
public static ItemShears shears
public static Item melon
public static Item pumpkinSeeds
public static Item melonSeeds
public static Item beefRaw
public static Item beefCooked
public static Item chickenRaw
public static Item chickenCooked
public static Item rottenFlesh
public static Item enderPearl
public static Item blazeRod
public static Item ghastTear
public static Item goldNugget
public static Item netherStalkSeeds
public static ItemPotion potion
public static Item glassBottle
public static Item spiderEye
public static Item fermentedSpiderEye
public static Item blazePowder
public static Item magmaCream
public static Item brewingStand
public static Item cauldron
public static Item eyeOfEnder
public static Item speckledMelon
public static Item monsterPlacer
public static Item expBottle
public static Item fireballCharge
public static Item writableBook
public static Item writtenBook
public static Item emerald
public static Item itemFrame
public static Item flowerPot
public static Item carrot
public static Item potato
public static Item bakedPotato
public static Item poisonousPotato
public static ItemEmptyMap emptyMap
public static Item goldenCarrot
public static Item skull
public static Item carrotOnAStick
public static Item netherStar
public static Item pumpkinPie
public static Item firework
public static Item fireworkCharge
public static ItemEnchantedBook enchantedBook
public static Item comparator
public static Item netherrackBrick
public static Item netherQuartz
public static Item minecartTnt
public static Item minecartHopper
public static Item horseArmorIron
public static Item horseArmorGold
public static Item horseArmorDiamond
public static Item leash
public static Item nameTag
public static Item record13
public static Item recordCat
public static Item recordBlocks
public static Item recordChirp
public static Item recordFar
public static Item recordMall
public static Item recordMellohi
public static Item recordStal
public static Item recordStrad
public static Item recordWard
public static Item record11
public static Item recordWait
public final int itemID
public Item setMaxStackSize(int par1)
public int getSpriteNumber()
public Icon getIconFromDamage(int par1)
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
public int getItemStackLimit()
public int getMetadata(int par1)
public boolean getHasSubtypes()
public int getMaxDamage()
public Item setMaxDamage(int par1)
public boolean isDamageable()
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
public boolean canHarvestBlock(Block par1Block)
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase)
public Item setFull3D()
public boolean isFull3D()
public boolean shouldRotateAroundWhenRendering()
public Item setUnlocalizedName(String par1Str)
public String getUnlocalizedNameInefficiently(ItemStack par1ItemStack)
public String getUnlocalizedName()
public String getUnlocalizedName(ItemStack par1ItemStack)
public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack)
public boolean getShareTag()
public Item getContainerItem()
public boolean hasContainerItem()
public String getStatName()
public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
public boolean isMap()
public EnumAction getItemUseAction(ItemStack par1ItemStack)
public int getMaxItemUseDuration(ItemStack par1ItemStack)
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
public Item setPotionEffect(String par1Str)
public String getPotionEffect()
public boolean isPotionIngredient()
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
@Deprecated public boolean hasEffect(ItemStack par1ItemStack)
public EnumRarity getRarity(ItemStack par1ItemStack)
public boolean isItemTool(ItemStack par1ItemStack)
public int getItemEnchantability()
public boolean requiresMultipleRenderPasses()
public Icon getIconFromDamageForRenderPass(int par1, int par2)
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
public Item setCreativeTab(CreativeTabs par1CreativeTabs)
public CreativeTabs getCreativeTab()
public boolean canItemEditBlocks()
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
public void registerIcons(IconRegister par1IconRegister)
public com.google.common.collect.Multimap getItemAttributeModifiers()
public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player)
player
- The player that dropped the itemitem
- The item stack, before the item is removed.public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
stack
- The Item Stackplayer
- The Player that used the itemworld
- The Current Worldx
- Target X Positiony
- Target Y Positionz
- Target Z Positionside
- The side of the target hitpublic float getStrVsBlock(ItemStack itemstack, Block block, int metadata)
itemstack
- The Item Stackblock
- The block the item is trying to breakmetadata
- The items current metadatapublic boolean isRepairable()
public Item setNoRepair()
public boolean onBlockStartBreak(ItemStack itemstack, int X, int Y, int Z, EntityPlayer player)
itemstack
- The current ItemStackX
- The X PositionY
- The X PositionZ
- The X Positionplayer
- The Player that is wielding the itempublic void onUsingItemTick(ItemStack stack, EntityPlayer player, int count)
stack
- The Item being usedplayer
- The Player using the itemcount
- The amount of time in tick the item has been used for continuouslypublic boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity)
stack
- The Item being usedplayer
- The player that is attackingentity
- The entity being attackedpublic Icon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
stack
- The item stack to get the icon for. (Usually this, and usingItem will be the same if usingItem is not null)renderPass
- The pass to get the icon for, 0 is default.player
- The player holding the itemusingItem
- The item the player is actively using. Can be null if not using anything.useRemaining
- The ticks remaining for the active item.public int getRenderPasses(int metadata)
metadata
- The item's metadatapublic ItemStack getContainerItemStack(ItemStack itemStack)
itemStack
- The current ItemStackpublic int getEntityLifespan(ItemStack itemStack, World world)
itemStack
- The current ItemStackworld
- The world the entity is inpublic boolean hasCustomEntity(ItemStack stack)
stack
- The current item stackpublic Entity createEntity(World world, Entity location, ItemStack itemstack)
world
- The world objectlocation
- The EntityItem object, useful for getting the position of the entityitemstack
- The current item stackpublic boolean onEntityItemUpdate(EntityItem entityItem)
entityItem
- The entity Itempublic CreativeTabs[] getCreativeTabs()
public float getSmeltingExperience(ItemStack item)
item
- The item stack the player is picking up.public Icon getIcon(ItemStack stack, int pass)
getIconFromDamageForRenderPass(int, int)
stack
- to render forpass
- the multi-render passpublic WeightedRandomChestContent getChestGenBase(ChestGenHooks chest, Random rnd, WeightedRandomChestContent original)
chest
- The chest category to generate forrnd
- World RNGoriginal
- Original result registered with the chest gen hooks.public boolean shouldPassSneakingClickToBlock(World par2World, int par4, int par5, int par6)
par2World
- par4
- par5
- par6
- public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack)
world
- player
- itemStack
- public boolean isValidArmor(ItemStack stack, int armorType, Entity entity)
stack
- The ItemStackarmorType
- Armor slot ID: 0: Helmet, 1: Chest, 2: Legs, 3: Bootsentity
- The entity trying to equip the armorpublic boolean isPotionIngredient(ItemStack stack)
stack
- The item stackpublic String getPotionEffect(ItemStack stack)
stack
- The item stackpublic boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2)
itemstack1
- The itemitemstack2
- The book@Deprecated public float getDamageVsEntity(Entity par1Entity, ItemStack itemStack)
par1Entity
- The entity being attacked (or the attacking mob, if it's a mob - vanilla bug?)itemStack
- The itemstack@Deprecated public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer)
stack
- ItemStack for the equpt armorentity
- The entity wearing the armorslot
- The slot the armor is inlayer
- The render layer, either 1 or 2, 2 is only used for CLOTH armor by defaultpublic String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
stack
- ItemStack for the equpt armorentity
- The entity wearing the armorslot
- The slot the armor is intype
- The subtype, can be null or "overlay"public FontRenderer getFontRenderer(ItemStack stack)
stack
- The current item stackpublic ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot)
entityLiving
- The entity wearing the armoritemStack
- The itemStack to render the model ofarmorSlot
- 0=head, 1=torso, 2=legs, 3=feetpublic boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack)
entityLiving
- The entity swinging the item.stack
- The Item stackpublic void renderHelmetOverlay(ItemStack stack, EntityPlayer player, ScaledResolution resolution, float partialTicks, boolean hasScreen, int mouseX, int mouseY)
stack
- The ItemStack that is equippedplayer
- Reference to the current client entityresolution
- Resolution information about the current viewport and configured GUI ScalepartialTicks
- Partial ticks for the renderer, useful for interpolationhasScreen
- If the player has a screen up, which will be rendered after this.mouseX
- Mouse's X position on screenmouseY
- Mouse's Y position on screenpublic int getDamage(ItemStack stack)
stack
- The itemstack that is damagedpublic int getDisplayDamage(ItemStack stack)
stack
- the stackpublic int getMaxDamage(ItemStack stack)
stack
- The itemstack that is damagedpublic boolean isDamaged(ItemStack stack)
isDamageable()
is true.stack
- the stackpublic void setDamage(ItemStack stack, int damage)
stack
- the stackdamage
- the new damage valuepublic boolean canHarvestBlock(Block par1Block, ItemStack itemStack)
canHarvestBlock(Block)
par1Block
- The block trying to harvestitemStack
- The itemstack used to harvest the blockpublic boolean hasEffect(ItemStack par1ItemStack, int pass)