|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.item.Item
public class Item
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()
|
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 |
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 pass)
Return the correct icon for rendering based on the supplied ItemStack and render pass. |
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,
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 |
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()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Item[] itemsList
public static Item shovelSteel
public static Item pickaxeSteel
public static Item axeSteel
public static Item flintAndSteel
public static Item appleRed
public static Item bow
public static Item arrow
public static Item coal
public static Item diamond
public static Item ingotIron
public static Item ingotGold
public static Item swordSteel
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 hoeSteel
public static Item hoeDiamond
public static Item hoeGold
public static Item seeds
public static Item wheat
public static Item bread
public static Item helmetLeather
public static Item plateLeather
public static Item legsLeather
public static Item bootsLeather
public static Item helmetChain
public static Item plateChain
public static Item legsChain
public static Item bootsChain
public static Item helmetSteel
public static Item plateSteel
public static Item legsSteel
public static Item bootsSteel
public static Item helmetDiamond
public static Item plateDiamond
public static Item legsDiamond
public static Item bootsDiamond
public static Item helmetGold
public static Item plateGold
public static Item legsGold
public static Item 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 doorSteel
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 Item fishingRod
public static Item pocketSundial
public static Item lightStoneDust
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 field_92052_bU
public static Item field_92054_bV
public static ItemEnchantedBook field_92053_bW
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 boolean isDefaultTexture
Constructor Detail |
---|
public Item(int par1)
Method Detail |
---|
public Item setIconIndex(int par1)
public Item setMaxStackSize(int par1)
public Item setIconCoord(int par1, int par2)
public int getIconFromDamage(int par1)
public final int getIconIndex(ItemStack par1ItemStack)
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 onFoodEaten(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, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLiving par7EntityLiving)
public int getDamageVsEntity(Entity par1Entity)
public boolean canHarvestBlock(Block par1Block)
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving)
public Item setFull3D()
public boolean isFull3D()
public boolean shouldRotateAroundWhenRendering()
public Item setItemName(String par1Str)
public String getLocalItemName(ItemStack par1ItemStack)
public String getItemName()
public String getItemNameIS(ItemStack par1ItemStack)
public Item setContainerItem(Item par1Item)
public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack)
public boolean getShareTag()
public Item getContainerItem()
public boolean hasContainerItem()
public String getStatName()
public String func_77653_i(ItemStack par1ItemStack)
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 String getPotionEffect()
public boolean isPotionIngredient()
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
public String getItemDisplayName(ItemStack par1ItemStack)
public boolean hasEffect(ItemStack par1ItemStack)
public EnumRarity getRarity(ItemStack par1ItemStack)
public boolean isItemTool(ItemStack par1ItemStack)
public int getItemEnchantability()
public boolean requiresMultipleRenderPasses()
public int getIconFromDamageForRenderPass(int par1, int par2)
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
public Item setCreativeTab(CreativeTabs par1CreativeTabs)
public CreativeTabs getCreativeTab()
public boolean func_82788_x()
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
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 hit
public float getStrVsBlock(ItemStack itemstack, Block block, int metadata)
itemstack
- The Item Stackblock
- The block the item is trying to breakmetadata
- The items current metadata
public 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 item
public 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 attacked
public int getIconIndex(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 metadata
public String getTextureFile()
public Item setTextureFile(String texture)
texture
- The texture filepublic ItemStack getContainerItemStack(ItemStack itemStack)
itemStack
- The current ItemStack
public int getEntityLifespan(ItemStack itemStack, World world)
itemStack
- The current ItemStackworld
- The world the entity is in
public boolean hasCustomEntity(ItemStack stack)
stack
- The current item stack
public 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 stack
public CreativeTabs[] getCreativeTabs()
public float getSmeltingExperience(ItemStack item)
item
- The item stack the player is picking up.
public int getIconIndex(ItemStack stack, int pass)
getIconFromDamageForRenderPass(int, int)
stack
- to render forpass
- the multi-render pass
public 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
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |