Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class Item

    java.lang.Object
      net.minecraft.src.Item

Direct Known Subclasses:
  ItemArmor, ItemBed, ItemBlock, ItemBoat, ItemBow, ItemBucket, ItemBucketMilk, ItemCarrotOnAStick, ItemCoal, ItemDoor, ItemDye, ItemEditableBook, ItemEgg, ItemEnderEye, ItemEnderPearl, ItemExpBottle, ItemFireball, ItemFishingRod, ItemFlintAndSteel, ItemFood, ItemGlassBottle, ItemHangingEntity, ItemHoe, ItemMapBase, ItemMinecart, ItemMonsterPlacer, ItemPotion, ItemRecord, ItemRedstone, ItemReed, ItemSaddle, ItemSeeds, ItemShears, ItemSign, ItemSimpleFoiled, ItemSkull, ItemSnowball, ItemSword, ItemTool, ItemWritableBook

    public class Item

extends Object

Field Summary
`static Item` | `appleGold`
`static Item` | `appleRed`
`static Item` | `arrow`
`static Item` | `axeDiamond`
`static Item` | `axeGold`
`static Item` | `axeSteel`
`static Item` | `axeStone`
`static Item` | `axeWood`
`static Item` | `bakedPotato`
`static Item` | `bed`
`static Item` | `beefCooked`
`static Item` | `beefRaw`
`static Item` | `blazePowder`
`static Item` | `blazeRod`
`static Item` | `boat`
`static Item` | `bone`
`static Item` | `book`
`static Item` | `bootsChain`
`static Item` | `bootsDiamond`
`static Item` | `bootsGold`
`static Item` | `bootsLeather`
`static Item` | `bootsSteel`
`static Item` | `bow`
`static Item` | `bowlEmpty`
`static Item` | `bowlSoup`
`static Item` | `bread`
`static Item` | `brewingStand`
`static Item` | `brick`
`static Item` | `bucketEmpty`
`static Item` | `bucketLava`
`static Item` | `bucketMilk`
`static Item` | `bucketWater`
`static Item` | `cake`
`static Item` | `carrot`
`static Item` | `carrotOnAStick`
`static Item` | `cauldron`
`static Item` | `chickenCooked`
`static Item` | `chickenRaw`
`static Item` | `clay`
`static Item` | `coal`
`static Item` | `compass`
`static Item` | `cookie`
`static Item` | `diamond`
`static Item` | `doorSteel`
`static Item` | `doorWood`
`static Item` | `dyePowder`
`static Item` | `egg`
`static Item` | `emerald`
`static ItemEmptyMap` | `emptyMap`
`static Item` | `enderPearl`
`static Item` | `expBottle` Bottle o' Enchanting.
`static Item` | `eyeOfEnder`
`static Item` | `feather`
`static Item` | `fermentedSpiderEye`
`static Item` | `field_85180_cf`
`static Item` | `fireballCharge` Fire Charge.
`static Item` | `fishCooked`
`static Item` | `fishingRod`
`static Item` | `fishRaw`
`static Item` | `flint`
`static Item` | `flintAndSteel`
`static Item` | `flowerPot`
`static Item` | `ghastTear`
`static Item` | `glassBottle`
`static Item` | `goldenCarrot`
`static Item` | `goldNugget`
`static Item` | `gunpowder`
`static Item` | `helmetChain`
`static Item` | `helmetDiamond`
`static Item` | `helmetGold`
`static Item` | `helmetLeather`
`static Item` | `helmetSteel`
`static Item` | `hoeDiamond`
`static Item` | `hoeGold`
`static Item` | `hoeSteel`
`static Item` | `hoeStone`
`static Item` | `hoeWood`
`static Item` | `ingotGold`
`static Item` | `ingotIron`
`boolean` | `isDefaultTexture`
`static Item` | `itemFrame`
`static Item[]` | `itemsList` A 32000 elements Item array.
`static Item` | `leather`
`static Item` | `legsChain`
`static Item` | `legsDiamond`
`static Item` | `legsGold`
`static Item` | `legsLeather`
`static Item` | `legsSteel`
`static Item` | `lightStoneDust`
`static Item` | `magmaCream`
`static ItemMap` | `map`
`static Item` | `melon`
`static Item` | `melonSeeds`
`static Item` | `minecartCrate`
`static Item` | `minecartEmpty`
`static Item` | `minecartPowered`
`static Item` | `monsterPlacer`
`static Item` | `netherStalkSeeds`
`static Item` | `netherStar`
`static Item` | `painting`
`static Item` | `paper`
`static Item` | `pickaxeDiamond`
`static Item` | `pickaxeGold`
`static Item` | `pickaxeSteel`
`static Item` | `pickaxeStone`
`static Item` | `pickaxeWood`
`static Item` | `plateChain`
`static Item` | `plateDiamond`
`static Item` | `plateGold`
`static Item` | `plateLeather`
`static Item` | `plateSteel`
`static Item` | `pocketSundial`
`static Item` | `poisonousPotato`
`static Item` | `porkCooked`
`static Item` | `porkRaw`
`static Item` | `potatoe`
`static ItemPotion` | `potion`
`static Item` | `pumpkinPie`
`static Item` | `pumpkinSeeds`
`static Item` | `record11`
`static Item` | `record13`
`static Item` | `recordBlocks`
`static Item` | `recordCat`
`static Item` | `recordChirp`
`static Item` | `recordFar`
`static Item` | `recordMall`
`static Item` | `recordMellohi`
`static Item` | `recordStal`
`static Item` | `recordStrad`
`static Item` | `recordWard`
`static Item` | `redstone`
`static Item` | `redstoneRepeater`
`static Item` | `reed`
`static Item` | `rottenFlesh`
`static Item` | `saddle`
`static Item` | `seeds`
`static ItemShears` | `shears` Item introduced on 1.7 version, is a shear to cut leaves (you can keep the block) or get wool from sheeps.
`int` | `shiftedIndex` Item index + 256
`static Item` | `shovelDiamond`
`static Item` | `shovelGold`
`static Item` | `shovelSteel`
`static Item` | `shovelStone`
`static Item` | `shovelWood`
`static Item` | `sign`
`static Item` | `silk`
`static Item` | `skull`
`static Item` | `slimeBall`
`static Item` | `snowball`
`static Item` | `speckledMelon`
`static Item` | `spiderEye`
`static Item` | `stick`
`static Item` | `sugar`
`static Item` | `swordDiamond`
`static Item` | `swordGold`
`static Item` | `swordSteel`
`static Item` | `swordStone`
`static Item` | `swordWood`
`static Item` | `wheat`
`static Item` | `writableBook`
`static Item` | `writtenBook`

Constructor Summary
`Item(int par1)`

Method Summary
`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.
`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.
`String` | `func_77653_i(ItemStack par1ItemStack)`
`boolean` | `func_82788_x()`
`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` | `getDamageVsEntity(Entity par1Entity)` Returns the damage against a given entity.
`int` | `getEntityLifespan(ItemStack itemStack, World world)` Retrieves the normal 'lifespan' of this item when it is dropped on the ground as a EntityItem.
`boolean` | `getHasSubtypes()`
`int` | `getIconFromDamage(int par1)`
`int` | `getIconFromDamageForRenderPass(int par1, int par2)`
`int` | `getIconIndex(ItemStack par1ItemStack)`
`int` | `getIconIndex(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)` Player, Render pass, and item usage sensitive version of getIconIndex.
`boolean` | `getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)` Return whether this item is repairable in an anvil.
`String` | `getItemDisplayName(ItemStack par1ItemStack)`
`int` | `getItemEnchantability()` Return the enchantability factor of the item, most of the time is based on material.
`String` | `getItemName()`
`String` | `getItemNameIS(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
`String` | `getLocalItemName(ItemStack par1ItemStack)`
`int` | `getMaxDamage()` Returns the maximum damage an item can take.
`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.
`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.
`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` | `getTextureFile()` Grabs the current texture file used for this block
`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)`
`boolean` | `hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)` Current implementations of this method in child classes do not use the entry argument beside ev.
`boolean` | `isDamageable()`
`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` | `isRepairable()` Called by CraftingManager to determine if an item is reparable.
`boolean` | `itemInteractionForEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving)` dye sheep, place saddles, etc ...
`boolean` | `onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)`
`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` | `onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)`
`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)` Deprecated.
`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.
`boolean` | `requiresMultipleRenderPasses()`
`Item` | `setContainerItem(Item par1Item)`
`Item` | `setCreativeTab(CreativeTabs par1CreativeTabs)` returns this;
`Item` | `setFull3D()` Sets bFull3D to True and return the object.
`Item` | `setIconCoord(int par1, int par2)`
`Item` | `setIconIndex(int par1)` Sets the icon index for this item.
`Item` | `setItemName(String par1Str)` set name of item from language file
`Item` | `setMaxDamage(int par1)` set max damage of an Item
`Item` | `setMaxStackSize(int par1)`
`Item` | `setNoRepair()` Call to disable repair recipes.
`Item` | `setTextureFile(String texture)` Sets the current texture file for this item, used when rendering.
`boolean` | `shouldRotateAroundWhenRendering()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### itemsList

    public static Item[] itemsList

  A 32000 elements Item array.

### shovelSteel

    public static Item shovelSteel

### pickaxeSteel

    public static Item pickaxeSteel

### axeSteel

    public static Item axeSteel

### flintAndSteel

    public static Item flintAndSteel

### appleRed

    public static Item appleRed

### bow

    public static Item bow

### arrow

    public static Item arrow

### coal

    public static Item coal

### diamond

    public static Item diamond

### ingotIron

    public static Item ingotIron

### ingotGold

    public static Item ingotGold

### swordSteel

    public static Item swordSteel

### swordWood

    public static Item swordWood

### shovelWood

    public static Item shovelWood

### pickaxeWood

    public static Item pickaxeWood

### axeWood

    public static Item axeWood

### swordStone

    public static Item swordStone

### shovelStone

    public static Item shovelStone

### pickaxeStone

    public static Item pickaxeStone

### axeStone

    public static Item axeStone

### swordDiamond

    public static Item swordDiamond

### shovelDiamond

    public static Item shovelDiamond

### pickaxeDiamond

    public static Item pickaxeDiamond

### axeDiamond

    public static Item axeDiamond

### stick

    public static Item stick

### bowlEmpty

    public static Item bowlEmpty

### bowlSoup

    public static Item bowlSoup

### swordGold

    public static Item swordGold

### shovelGold

    public static Item shovelGold

### pickaxeGold

    public static Item pickaxeGold

### axeGold

    public static Item axeGold

### silk

    public static Item silk

### feather

    public static Item feather

### gunpowder

    public static Item gunpowder

### hoeWood

    public static Item hoeWood

### hoeStone

    public static Item hoeStone

### hoeSteel

    public static Item hoeSteel

### hoeDiamond

    public static Item hoeDiamond

### hoeGold

    public static Item hoeGold

### seeds

    public static Item seeds

### wheat

    public static Item wheat

### bread

    public static Item bread

### helmetLeather

    public static Item helmetLeather

### plateLeather

    public static Item plateLeather

### legsLeather

    public static Item legsLeather

### bootsLeather

    public static Item bootsLeather

### helmetChain

    public static Item helmetChain

### plateChain

    public static Item plateChain

### legsChain

    public static Item legsChain

### bootsChain

    public static Item bootsChain

### helmetSteel

    public static Item helmetSteel

### plateSteel

    public static Item plateSteel

### legsSteel

    public static Item legsSteel

### bootsSteel

    public static Item bootsSteel

### helmetDiamond

    public static Item helmetDiamond

### plateDiamond

    public static Item plateDiamond

### legsDiamond

    public static Item legsDiamond

### bootsDiamond

    public static Item bootsDiamond

### helmetGold

    public static Item helmetGold

### plateGold

    public static Item plateGold

### legsGold

    public static Item legsGold

### bootsGold

    public static Item bootsGold

### flint

    public static Item flint

### porkRaw

    public static Item porkRaw

### porkCooked

    public static Item porkCooked

### painting

    public static Item painting

### appleGold

    public static Item appleGold

### sign

    public static Item sign

### doorWood

    public static Item doorWood

### bucketEmpty

    public static Item bucketEmpty

### bucketWater

    public static Item bucketWater

### bucketLava

    public static Item bucketLava

### minecartEmpty

    public static Item minecartEmpty

### saddle

    public static Item saddle

### doorSteel

    public static Item doorSteel

### redstone

    public static Item redstone

### snowball

    public static Item snowball

### boat

    public static Item boat

### leather

    public static Item leather

### bucketMilk

    public static Item bucketMilk

### brick

    public static Item brick

### clay

    public static Item clay

### reed

    public static Item reed

### paper

    public static Item paper

### book

    public static Item book

### slimeBall

    public static Item slimeBall

### minecartCrate

    public static Item minecartCrate

### minecartPowered

    public static Item minecartPowered

### egg

    public static Item egg

### compass

    public static Item compass

### fishingRod

    public static Item fishingRod

### pocketSundial

    public static Item pocketSundial

### lightStoneDust

    public static Item lightStoneDust

### fishRaw

    public static Item fishRaw

### fishCooked

    public static Item fishCooked

### dyePowder

    public static Item dyePowder

### bone

    public static Item bone

### sugar

    public static Item sugar

### cake

    public static Item cake

### bed

    public static Item bed

### redstoneRepeater

    public static Item redstoneRepeater

### cookie

    public static Item cookie

### map

    public static ItemMap map

### shears

    public static ItemShears shears

  Item introduced on 1.7 version, is a shear to cut leaves (you can keep the block) or get wool from sheeps.

### melon

    public static Item melon

### pumpkinSeeds

    public static Item pumpkinSeeds

### melonSeeds

    public static Item melonSeeds

### beefRaw

    public static Item beefRaw

### beefCooked

    public static Item beefCooked

### chickenRaw

    public static Item chickenRaw

### chickenCooked

    public static Item chickenCooked

### rottenFlesh

    public static Item rottenFlesh

### enderPearl

    public static Item enderPearl

### blazeRod

    public static Item blazeRod

### ghastTear

    public static Item ghastTear

### goldNugget

    public static Item goldNugget

### netherStalkSeeds

    public static Item netherStalkSeeds

### potion

    public static ItemPotion potion

### glassBottle

    public static Item glassBottle

### spiderEye

    public static Item spiderEye

### fermentedSpiderEye

    public static Item fermentedSpiderEye

### blazePowder

    public static Item blazePowder

### magmaCream

    public static Item magmaCream

### brewingStand

    public static Item brewingStand

### cauldron

    public static Item cauldron

### eyeOfEnder

    public static Item eyeOfEnder

### speckledMelon

    public static Item speckledMelon

### monsterPlacer

    public static Item monsterPlacer

### expBottle

    public static Item expBottle

  Bottle o' Enchanting. Drops between 1 and 3 experience orbs when thrown.

### fireballCharge

    public static Item fireballCharge

  Fire Charge. When used in a dispenser it fires a fireball similiar to a Ghast's.

### writableBook

    public static Item writableBook

### writtenBook

    public static Item writtenBook

### emerald

    public static Item emerald

### itemFrame

    public static Item itemFrame

### flowerPot

    public static Item flowerPot

### carrot

    public static Item carrot

### potatoe

    public static Item potatoe

### bakedPotato

    public static Item bakedPotato

### poisonousPotato

    public static Item poisonousPotato

### emptyMap

    public static ItemEmptyMap emptyMap

### goldenCarrot

    public static Item goldenCarrot

### skull

    public static Item skull

### carrotOnAStick

    public static Item carrotOnAStick

### netherStar

    public static Item netherStar

### pumpkinPie

    public static Item pumpkinPie

### record13

    public static Item record13

### recordCat

    public static Item recordCat

### recordBlocks

    public static Item recordBlocks

### recordChirp

    public static Item recordChirp

### recordFar

    public static Item recordFar

### recordMall

    public static Item recordMall

### recordMellohi

    public static Item recordMellohi

### recordStal

    public static Item recordStal

### recordStrad

    public static Item recordStrad

### recordWard

    public static Item recordWard

### record11

    public static Item record11

### field_85180_cf

    public static Item field_85180_cf

### shiftedIndex

    public final int shiftedIndex

  Item index + 256

### isDefaultTexture

    public boolean isDefaultTexture

Constructor Detail

### Item

    public Item(int par1)

Method Detail

### setIconIndex

    public Item setIconIndex(int par1)

  Sets the icon index for this item. Returns the item.

### setMaxStackSize

    public Item setMaxStackSize(int par1)

### setIconCoord

    public Item setIconCoord(int par1,
                             int par2)

### getIconFromDamage

    public int getIconFromDamage(int par1)

### getIconIndex

    public final int getIconIndex(ItemStack par1ItemStack)

### onItemUse

    public 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. If the item does something special on right clicking, he will have one of those. Return True if something happen and false if it don't. This is for ITEMS, not BLOCKS

### getStrVsBlock

    public float getStrVsBlock(ItemStack par1ItemStack,
                               Block par2Block)

  Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if sword

### onItemRightClick

    public ItemStack onItemRightClick(ItemStack par1ItemStack,
                                      World par2World,
                                      EntityPlayer par3EntityPlayer)

  Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer

### onFoodEaten

    public ItemStack onFoodEaten(ItemStack par1ItemStack,
                                 World par2World,
                                 EntityPlayer par3EntityPlayer)

### getItemStackLimit

    public int getItemStackLimit()

  Returns the maximum size of the stack for a specific item. *Isn't this more a Set than a Get?*

### getMetadata

    public int getMetadata(int par1)

  Returns the metadata of the block which this Item (ItemBlock) can place

### getHasSubtypes

    public boolean getHasSubtypes()

### getMaxDamage

    public int getMaxDamage()

  Returns the maximum damage an item can take.

### setMaxDamage

    public Item setMaxDamage(int par1)

  set max damage of an Item

### isDamageable

    public boolean isDamageable()

### hitEntity

    public boolean hitEntity(ItemStack par1ItemStack,
                             EntityLiving par2EntityLiving,
                             EntityLiving par3EntityLiving)

  Current implementations of this method in child classes do not use the entry argument beside ev. They just raise the damage on the stack.

### onBlockDestroyed

    public boolean onBlockDestroyed(ItemStack par1ItemStack,
                                    World par2World,
                                    int par3,
                                    int par4,
                                    int par5,
                                    int par6,
                                    EntityLiving par7EntityLiving)

### getDamageVsEntity

    public int getDamageVsEntity(Entity par1Entity)

  Returns the damage against a given entity.

### canHarvestBlock

    public boolean canHarvestBlock(Block par1Block)

  Returns if the item (tool) can harvest results from the block type.

### itemInteractionForEntity

    public boolean itemInteractionForEntity(ItemStack par1ItemStack,
                                            EntityLiving par2EntityLiving)

  dye sheep, place saddles, etc ...

### setFull3D

    public Item setFull3D()

  Sets bFull3D to True and return the object.

### isFull3D

    public boolean isFull3D()

### shouldRotateAroundWhenRendering

    public boolean shouldRotateAroundWhenRendering()

### setItemName

    public Item setItemName(String par1Str)

  set name of item from language file

### getLocalItemName

    public String getLocalItemName(ItemStack par1ItemStack)

### getItemName

    public String getItemName()

### getItemNameIS

    public String getItemNameIS(ItemStack par1ItemStack)

### setContainerItem

    public Item setContainerItem(Item par1Item)

### doesContainerItemLeaveCraftingGrid

    public 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.

### getShareTag

    public boolean getShareTag()

  If this function returns true (or the item is damageable), the ItemStack's NBT tag will be sent to the client.

### getContainerItem

    public Item getContainerItem()

### hasContainerItem

    public boolean hasContainerItem()

  True if this Item has a container item (a.k.a. crafting result)

### getStatName

    public String getStatName()

### func_77653_i

    public String func_77653_i(ItemStack par1ItemStack)

### getColorFromItemStack

    public int getColorFromItemStack(ItemStack par1ItemStack,
                                     int par2)

### onUpdate

    public void onUpdate(ItemStack par1ItemStack,
                         World par2World,
                         Entity par3Entity,
                         int par4,
                         boolean par5)

  Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and update it's contents.

### onCreated

    public void onCreated(ItemStack par1ItemStack,
                          World par2World,
                          EntityPlayer par3EntityPlayer)

  Called when item is crafted/smelted. Used only by maps so far.

### isMap

    public boolean isMap()

  false for all Items except sub-classes of ItemMapBase

### getItemUseAction

    public EnumAction getItemUseAction(ItemStack par1ItemStack)

  returns the action that specifies what animation to play when the items is being used

### getMaxItemUseDuration

    public int getMaxItemUseDuration(ItemStack par1ItemStack)

  How long it takes to use or consume an item

### onPlayerStoppedUsing

    public void onPlayerStoppedUsing(ItemStack par1ItemStack,
                                     World par2World,
                                     EntityPlayer par3EntityPlayer,
                                     int par4)

  called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount

### getPotionEffect

    public String getPotionEffect()

  Returns a string representing what this item does to a potion.

### isPotionIngredient

    public boolean isPotionIngredient()

  Returns true if this item serves as a potion ingredient (its ingredient information is not null).

### addInformation

    public void addInformation(ItemStack par1ItemStack,
                               EntityPlayer par2EntityPlayer,
                               List par3List,
                               boolean par4)

### getItemDisplayName

    public String getItemDisplayName(ItemStack par1ItemStack)

### hasEffect

    public boolean hasEffect(ItemStack par1ItemStack)

### getRarity

    public EnumRarity getRarity(ItemStack par1ItemStack)

### isItemTool

    public boolean isItemTool(ItemStack par1ItemStack)

  Checks isDamagable and if it cannot be stacked

### getItemEnchantability

    public int getItemEnchantability()

  Return the enchantability factor of the item, most of the time is based on material.

### requiresMultipleRenderPasses

    public boolean requiresMultipleRenderPasses()

### getIconFromDamageForRenderPass

    public int getIconFromDamageForRenderPass(int par1,
                                              int par2)

### getSubItems

    public void getSubItems(int par1,
                            CreativeTabs par2CreativeTabs,
                            List par3List)

### setCreativeTab

    public Item setCreativeTab(CreativeTabs par1CreativeTabs)

  returns this;

### getCreativeTab

    public CreativeTabs getCreativeTab()

### func_82788_x

    public boolean func_82788_x()

### getIsRepairable

    public boolean getIsRepairable(ItemStack par1ItemStack,
                                   ItemStack par2ItemStack)

  Return whether this item is repairable in an anvil.

### onDroppedByPlayer

    public 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

  Parameters:
    `player` - The player that dropped the item
    `item` - The item stack, before the item is removed.

### onItemUseFirst

    public 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.

  Parameters:
    `stack` - The Item Stack
    `player` - The Player that used the item
    `world` - The Current World
    `x` - Target X Position
    `y` - Target Y Position
    `z` - Target Z Position
    `side` - The side of the target hit
  Returns:
    Return true to prevent any further processing.

### onItemUseFirst

    @Deprecated
    public boolean onItemUseFirst(ItemStack stack,
                                             EntityPlayer player,
                                             World world,
                                             int x,
                                             int y,
                                             int z,
                                             int side)

  Deprecated.

  See onItemUseFirst above, this is deprecated in favor of the more aware version. Only here for compaibility.

### getStrVsBlock

    public float getStrVsBlock(ItemStack itemstack,
                               Block block,
                               int metadata)

  Metadata-sensitive version of getStrVsBlock

  Parameters:
    `itemstack` - The Item Stack
    `block` - The block the item is trying to break
    `metadata` - The items current metadata
  Returns:
    The damage strength

### isRepairable

    public boolean isRepairable()

  Called by CraftingManager to determine if an item is reparable.

  Returns:
    True if reparable

### setNoRepair

    public Item setNoRepair()

  Call to disable repair recipes.

  Returns:
    The current Item instance

### onBlockStartBreak

    public boolean onBlockStartBreak(ItemStack itemstack,
                                     int X,
                                     int Y,
                                     int Z,
                                     EntityPlayer player)

  Called before a block is broken. Return true to prevent default block harvesting. Note: In SMP, this is called on both client and server sides!

  Parameters:
    `itemstack` - The current ItemStack
    `X` - The X Position
    `Y` - The X Position
    `Z` - The X Position
    `player` - The Player that is wielding the item
  Returns:
    True to prevent harvesting, false to continue as normal

### onUsingItemTick

    public void onUsingItemTick(ItemStack stack,
                                EntityPlayer player,
                                int count)

  Called each tick while using an item.

  Parameters:
    `stack` - The Item being used
    `player` - The Player using the item
    `count` - The amount of time in tick the item has been used for continuously

### onLeftClickEntity

    public boolean onLeftClickEntity(ItemStack stack,
                                     EntityPlayer player,
                                     Entity entity)

  Called when the player Left Clicks (attacks) an entity. Processed before damage is done, if return value is true further processing is canceled and the entity is not attacked.

  Parameters:
    `stack` - The Item being used
    `player` - The player that is attacking
    `entity` - The entity being attacked
  Returns:
    True to cancel the rest of the interaction.

### getIconIndex

    public int getIconIndex(ItemStack stack,
                            int renderPass,
                            EntityPlayer player,
                            ItemStack usingItem,
                            int useRemaining)

  Player, Render pass, and item usage sensitive version of getIconIndex.

  Parameters:
    `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 item
    `usingItem` - The item the player is actively using. Can be null if not using anything.
    `useRemaining` - The ticks remaining for the active item.
  Returns:
    The icon index

### getRenderPasses

    public int getRenderPasses(int metadata)

  Returns the number of render passes/layers this item has. Usually equates to ItemRenderer.renderItem being called for this many passes. Does not get called unless requiresMultipleRenderPasses() is true;

  Parameters:
    `metadata` - The item's metadata
  Returns:
    The number of passes to run.

### getTextureFile

    public String getTextureFile()

  Grabs the current texture file used for this block

### setTextureFile

    public Item setTextureFile(String texture)

  Sets the current texture file for this item, used when rendering. Default is "/gui/items.png"

  Parameters:
    `texture` - The texture file

### getContainerItemStack

    public ItemStack getContainerItemStack(ItemStack itemStack)

  ItemStack sensitive version of getContainerItem. Returns a full ItemStack instance of the result.

  Parameters:
    `itemStack` - The current ItemStack
  Returns:
    The resulting ItemStack

### getEntityLifespan

    public int getEntityLifespan(ItemStack itemStack,
                                 World world)

  Retrieves the normal 'lifespan' of this item when it is dropped on the ground as a EntityItem. This is in ticks, standard result is 6000, or 5 mins.

  Parameters:
    `itemStack` - The current ItemStack
    `world` - The world the entity is in
  Returns:
    The normal lifespan in ticks.

### hasCustomEntity

    public boolean hasCustomEntity(ItemStack stack)

  Determines if this Item has a special entity for when they are in the world. Is called when a EntityItem is spawned in the world, if true and Item#createCustomEntity returns non null, the EntityItem will be destroyed and the new Entity will be added to the world.

  Parameters:
    `stack` - The current item stack
  Returns:
    True of the item has a custom entity, If true, Item#createCustomEntity will be called

### createEntity

    public Entity createEntity(World world,
                               Entity location,
                               ItemStack itemstack)

  This function should return a new entity to replace the dropped item. Returning null here will not kill the EntityItem and will leave it to function normally. Called when the item it placed in a world.

  Parameters:
    `world` - The world object
    `location` - The EntityItem object, useful for getting the position of the entity
    `itemstack` - The current item stack
  Returns:
    A new Entity object to spawn or null

### getCreativeTabs

    public 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.

  Returns:
    A list of all tabs that this item could possibly be one.

### getSmeltingExperience

    public float getSmeltingExperience(ItemStack item)

  Determines the base experience for a player when they remove this item from a furnace slot. This number must be between 0 and 1 for it to be valid. This number will be multiplied by the stack size to get the total experience.

  Parameters:
    `item` - The item stack the player is picking up.
  Returns:
    The amount to award for each item.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD