Package net.minecraft.src
Class Item
java.lang.Object
net.minecraft.src.Item
- Direct Known Subclasses:
ArcaneScrollItem,ArrowItem,BarkItem,BoneItem,BreedingHarnessItem,BucketItemLava,CanvasItem,ClubItem,CorpseEyeItem,DirtPileItem,DoorItem,DungItem,DynamiteItem,FireStarterItem,FlintItem,GravelPileItem,ItemArmor,ItemBed,ItemBoat,ItemBook,ItemBow,ItemBucket,ItemBucketMilk,ItemCarrotOnAStick,ItemCoal,ItemDoor,ItemDye,ItemEditableBook,ItemEgg,ItemEnchantedBook,ItemEnderEye,ItemEnderPearl,ItemExpBottle,ItemFireball,ItemFirework,ItemFireworkCharge,ItemFishingRod,ItemFlintAndSteel,ItemFood,ItemGlassBottle,ItemHangingEntity,ItemHoe,ItemLeash,ItemMapBase,ItemMinecart,ItemMonsterPlacer,ItemNameTag,ItemPotion,ItemRecord,ItemRedstone,ItemSaddle,ItemSeeds,ItemShears,ItemSign,ItemSimpleFoiled,ItemSkull,ItemSnowball,ItemSword,ItemTemplate,ItemTool,ItemWritableBook,KnittingNeedlesItem,LegacyWheatItem,LocatorPileItem,MortarItem,MouldItem,MysteriousGlandItem,NetherBrickItem,NetherGrothSporesItem,NetherQuartzItem,PlaceAsBlockItem,ProgressiveCraftingItem,RopeItem,SandPileItem,SeedItem,SoapItem,SoulFluxItem,SoulSandPileItem,StoneBrickItem,StrawItem,StubItem,StumpRemoverItem,ThrowableItem,ToolItem,TuningForkItem,VerticalWindMillItem,WaterWheelItem,WheatItem,WickerPieceItem,WindMillItem,WoolItem,WoolKnitItem
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic final intstatic final intstatic final intstatic Itemstatic Itemstatic Itemprotected booleanstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemBowstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemprotected intstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic ItemEmptyMapstatic ItemEnchantedBookstatic Itemstatic ItemBottle o' Enchanting.static Itemstatic Itemstatic Itemstatic final UUIDstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic Itemstatic Itemstatic Itemstatic Itemstatic ItemFishingRodstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemprotected booleanSome items (like dyes) have multiple subtypes on same item, this is field define this behaviorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemprotected StringThe string associated with this Item's Icon.static Itemstatic Itemprotected booleanstatic ItemIcon index in the icons table.final intThe ID of this item.protected static RandomThe RNG used by the Item subclasses.static Item[]A 32000 elements Item array.static Itemstatic Itemstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic Itemstatic ItemMapprotected intMaximum size of the stack.static Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemprotected Stringstatic Stringstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic ItemArmorstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic ItemPotionstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic ItemShearsstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic booleanstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Itemstatic Item -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) allows items to add custom lines of information to the mouseover descriptionbooleancanHarvestBlock(ItemStack stack, World world, Block block, int i, int j, int k) booleancanItemBeUsedByPlayer(World world, int i, int j, int k, int iFacing, EntityPlayer player, ItemStack stack) Method which replaces canPlaceItemBlockOnSide() in ItemBlock.booleanReturns true if players can use this item to affect the world (e.g. placing blocks, placing ender eyes in portal) when not in creativecreateItemAsEntityInWorld(World world, double x, double y, double z, ItemStack stack) booleandoesConsumeContainerItemWhenCrafted(Item containerItem) booleandoesContainerItemLeaveCraftingGrid(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.booleangetAnimationIcon(EntityPlayer player) Used to change the item icon the player is holding.floatgetBuoyancy(int iItemDamage) intgetCampfireBurnTime(int iItemDamage) booleangetCanBeFedDirectlyIntoBrickOven(int iItemDamage) booleangetCanBeFedDirectlyIntoCampfire(int iItemDamage) booleangetCanItemBeSetOnFireOnUse(int iItemDamage) Used to override default activation behavior on certain blocks like accessing inventory on furnace and campfiresbooleangetCanItemStartFireOnUse(int iItemDamage) Used to override default activation behavior on certain blocks like accessing inventory on furnace and campfiresintgetChickenFoodValue(int iItemDamage) intgetColorFromItemStack(ItemStack par1ItemStack, int par2) gets the CreativeTab this item is displayed onfloatgetExhaustionOnUsedToHarvestBlock(int iBlockID, World world, int i, int j, int k, int iBlockMetadata) intgetFurnaceBurnTime(int iItemDamage) booleanintgetHerbivoreFoodValue(int iItemDamage) getIconFromDamage(int par1) Gets an icon index based on an item's damage valuegetIconFromDamageForRenderPass(int par1, int par2) Gets an icon index based on an item's damage value and the given render passfinal IcongetIconIndex(ItemStack par1ItemStack) Returns the icon index of the stack given as argument.protected StringReturns the string associated with this Item's Icon.intintbooleangetIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) Return whether this item is repairable in an anvil.com.google.common.collect.MultimapGets a map of item attribute modifiers, used by ItemSword to increase hit damage.getItemDisplayName(ItemStack par1ItemStack) intReturn the enchantability factor of the item, most of the time is based on material.longgetItemStackDisplayName(ItemStack par1ItemStack) intReturns the maximum size of the stack for a specific item.getItemUseAction(ItemStack par1ItemStack) returns the action that specifies what animation to play when the items is being usedintintReturns the maximum damage an item can take.intgetMaxItemUseDuration(ItemStack par1ItemStack) How long it takes to use or consume an itemintgetMetadata(int par1) Returns the metadata of the block which this Item (ItemBlock) can placegetModId()Mod ID (same as in fabric.mod.json) of mod that adds this item.protected MovingObjectPositiongetMovingObjectPositionFromPlayer(World par1World, EntityPlayer par2EntityPlayer, boolean par3) intgetPigFoodValue(int iItemDamage) Returns a string representing what this item does to a potion.Return an item rarity from EnumRaritybooleanIf this function returns true (or the item is damageable), the ItemStack's NBT tag will be sent to the client.intReturns 0 for /terrain.png, 1 for /gui/items.pngfloatgetStrVsBlock(ItemStack stack, World world, Block block, int i, int j, int k) voidgetSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) returns a list of items with the same ID, but different meta (eg: dye returns 16 items)Returns the unlocalized name of this item.getUnlocalizedName(ItemStack par1ItemStack) Returns the unlocalized name of this item.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.intbooleanTrue if this Item has a container item (a.k.a. crafting result)booleanbooleanRemoves this item from the EMI sidebar.booleanhitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) Current implementations of this method in child classes do not use the entry argument beside ev.booleanvoidinitializeStackOnGiveCommand(Random rand, ItemStack stack) booleanbooleanbooleanbooleanisEfficientVsBlock(ItemStack stack, World world, Block block, int i, int j, int k) booleanisEnchantmentApplicable(Enchantment enchantment) booleanisFull3D()Returns True is the item is renderer in full 3D when hold.booleanbooleanisItemTool(ItemStack par1ItemStack) Checks isDamagable and if it cannot be stackedbooleanisMap()false for all Items except sub-classes of ItemMapBasebooleanbooleanReturns true if this item serves as a potion ingredient (its ingredient information is not null).booleanbooleanitemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase) Returns true if the item can be used on the given entity, e.g. shears on sheep.booleanonBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase) voidonBrokenInCrafting(EntityPlayer player) voidonCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) Called when item is crafted/smelted.voidonDamagedInCrafting(EntityPlayer player) onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) // +++START EDIT+++ // ---END EDIT--- Called whenever this item is equipped and the right mouse button is pressed.booleanonItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) Callback for item usage.booleanonItemUsedByBlockDispenser(ItemStack stack, World world, int i, int j, int k, int iFacing) This method should return true if the item is successfully placed (in which case the BD will consume the corresponding item in its inventory), false otherwise.voidonPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) called when the player releases the use item button.voidonUpdate(ItemStack stack, World world, EntityPlayer entity, int iInventorySlot, boolean bIsHandHeldItem) Called each tick as long the item is on a player inventory.voidonUsedInCrafting(int iItemDamage, EntityPlayer player, ItemStack outputStack) voidonUsedInCrafting(EntityPlayer player, ItemStack outputStack) voidregisterIcons(IconRegister par1IconRegister) booleanstatic voidstatic voidstatic voidsetBuoyancy(float fBuoyancy) setChickenFoodValue(int iFoodValue) setContainerItem(Item par1Item) setCreativeTab(CreativeTabs par1CreativeTabs) returns this;voidsetCustomItemEntity(Class entityClass) Sets bFull3D to True and return the object.setfurnaceburntime(int iBurnTime) setfurnaceburntime(FurnaceBurnTime burnTime) protected ItemsetHasSubtypes(boolean par1) setHerbivoreFoodValue(int iFoodValue) setInfernalMaxEnchantmentCost(int iMaxEnchantmentCost) setInfernalMaxNumEnchants(int iMaxNumEnchants) setItemRightClickCooldown(long ticks) protected ItemsetMaxDamage(int par1) set max damage of an ItemsetMaxStackSize(int par1) voidMod ID (same as in fabric.mod.json) of mod that adds this item.setPigFoodValue(int iFoodValue) setPotionEffect(String par1Str) Sets the string representing this item's effect on a potion when used as an ingredient.setTextureName(String par1Str) setUnlocalizedName(String par1Str) Sets the unlocalized name of this item to the string passed as the parameter, prefixed by "item."booleanbooleanbooleanReturns true if this item should be rotated by 180 degrees around the Y axis when being held in an entities hands.voidupdateUsingItem(ItemStack stack, World world, EntityPlayer player)
-
Field Details
-
field_111210_e
-
modIDSetter
-
modID
-
itemRand
The RNG used by the Item subclasses. -
itemsList
A 32000 elements Item array. -
FILTERABLE_NO_PROPERTIES
public static final int FILTERABLE_NO_PROPERTIES- See Also:
-
FILTERABLE_SOLID_BLOCK
public static final int FILTERABLE_SOLID_BLOCK- See Also:
-
FILTERABLE_SMALL
public static final int FILTERABLE_SMALL- See Also:
-
FILTERABLE_NARROW
public static final int FILTERABLE_NARROW- See Also:
-
FILTERABLE_FINE
public static final int FILTERABLE_FINE- See Also:
-
FILTERABLE_THIN
public static final int FILTERABLE_THIN- See Also:
-
shovelIron
-
pickaxeIron
-
axeIron
-
flintAndSteel
-
appleRed
-
bow
-
arrow
-
coal
-
diamond
-
ingotIron
-
ingotGold
-
swordIron
-
swordWood
-
shovelWood
-
pickaxeWood
-
axeWood
-
swordStone
-
shovelStone
-
pickaxeStone
-
axeStone
-
swordDiamond
-
shovelDiamond
-
pickaxeDiamond
-
axeDiamond
-
stick
-
bowlEmpty
-
bowlSoup
-
swordGold
-
shovelGold
-
pickaxeGold
-
axeGold
-
silk
-
feather
-
gunpowder
-
hoeWood
-
hoeStone
-
hoeIron
-
hoeDiamond
-
hoeGold
-
seeds
-
wheat
-
bread
-
helmetLeather
-
plateLeather
-
legsLeather
-
bootsLeather
-
helmetChain
-
plateChain
-
legsChain
-
bootsChain
-
helmetIron
-
plateIron
-
legsIron
-
bootsIron
-
helmetDiamond
-
plateDiamond
-
legsDiamond
-
bootsDiamond
-
helmetGold
-
plateGold
-
legsGold
-
bootsGold
-
flint
-
porkRaw
-
porkCooked
-
painting
-
appleGold
-
sign
-
doorWood
-
bucketEmpty
-
bucketWater
-
bucketLava
-
minecartEmpty
-
saddle
-
doorIron
-
redstone
-
snowball
-
boat
-
leather
-
bucketMilk
-
brick
-
clay
-
reed
-
paper
-
book
-
slimeBall
-
minecartCrate
-
minecartPowered
-
egg
-
compass
-
fishingRod
-
pocketSundial
-
glowstone
-
fishRaw
-
fishCooked
-
dyePowder
-
bone
-
sugar
-
cake
-
bed
-
redstoneRepeater
-
cookie
-
map
-
shears
-
melon
-
pumpkinSeeds
-
melonSeeds
-
beefRaw
-
beefCooked
-
chickenRaw
-
chickenCooked
-
rottenFlesh
-
enderPearl
-
blazeRod
-
ghastTear
-
goldNugget
-
netherStalkSeeds
-
potion
-
glassBottle
-
spiderEye
-
fermentedSpiderEye
-
blazePowder
-
magmaCream
-
brewingStand
-
cauldron
-
eyeOfEnder
-
speckledMelon
-
monsterPlacer
-
expBottle
Bottle o' Enchanting. Drops between 1 and 3 experience orbs when thrown. -
fireballCharge
-
writableBook
-
writtenBook
-
emerald
-
itemFrame
-
flowerPot
-
carrot
-
potato
-
bakedPotato
-
poisonousPotato
-
emptyMap
-
goldenCarrot
-
skull
-
carrotOnAStick
-
netherStar
-
pumpkinPie
-
firework
-
fireworkCharge
-
enchantedBook
-
comparator
-
netherrackBrick
-
netherQuartz
-
minecartTnt
-
minecartHopper
-
horseArmorIron
-
horseArmorGold
-
horseArmorDiamond
-
leash
-
nameTag
-
record13
-
recordCat
-
recordBlocks
-
recordChirp
-
recordFar
-
recordMall
-
recordMellohi
-
recordStal
-
recordStrad
-
recordWard
-
record11
-
recordWait
-
itemID
public final int itemIDThe ID of this item. -
maxStackSize
protected int maxStackSizeMaximum size of the stack. -
bFull3D
protected boolean bFull3D -
hasSubtypes
protected boolean hasSubtypesSome items (like dyes) have multiple subtypes on same item, this is field define this behavior -
itemIcon
Icon index in the icons table. -
iconString
The string associated with this Item's Icon. -
suppressConflictWarnings
public static boolean suppressConflictWarnings -
BASE_HERBIVORE_ITEM_FOOD_VALUE
public static final int BASE_HERBIVORE_ITEM_FOOD_VALUE- See Also:
-
BASE_PIG_ITEM_FOOD_VALUE
public static final int BASE_PIG_ITEM_FOOD_VALUE- See Also:
-
BASE_CHICKEN_ITEM_FOOD_VALUE
public static final int BASE_CHICKEN_ITEM_FOOD_VALUE- See Also:
-
defaultFurnaceBurnTime
protected int defaultFurnaceBurnTime -
isInceratedInCrucible
protected boolean isInceratedInCrucible
-
-
Constructor Details
-
Item
public Item(int par1)
-
-
Method Details
-
setMaxStackSize
-
getSpriteNumber
public int getSpriteNumber()Returns 0 for /terrain.png, 1 for /gui/items.png -
getIconFromDamage
Gets an icon index based on an item's damage value -
getIconIndex
Returns the icon index of the stack given as argument. -
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 -
onItemRightClick
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) // +++START EDIT+++ // ---END EDIT--- Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer -
onEaten
-
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() -
setHasSubtypes
-
getMaxDamage
public int getMaxDamage()Returns the maximum damage an item can take. -
setMaxDamage
set max damage of an Item -
isDamageable
public boolean isDamageable() -
getItemRightClickCooldown
public long getItemRightClickCooldown() -
setItemRightClickCooldown
-
hitEntity
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) 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, EntityLivingBase par7EntityLivingBase) -
itemInteractionForEntity
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase) Returns true if the item can be used on the given entity, e.g. shears on sheep. -
setFull3D
Sets bFull3D to True and return the object. -
isFull3D
public boolean isFull3D()Returns True is the item is renderer in full 3D when hold. -
shouldRotateAroundWhenRendering
public boolean shouldRotateAroundWhenRendering()Returns true if this item should be rotated by 180 degrees around the Y axis when being held in an entities hands. -
setUnlocalizedName
Sets the unlocalized name of this item to the string passed as the parameter, prefixed by "item." -
getUnlocalizedNameInefficiently
Translates the unlocalized name of this item, but without the .name suffix, so the translation fails and the unlocalized name itself is returned. -
getUnlocalizedName
Returns the unlocalized name of this item. -
getUnlocalizedName
Returns the unlocalized name of this item. This version accepts an ItemStack so different stacks can have different names based on their damage or NBT. -
setContainerItem
-
doesContainerItemLeaveCraftingGrid
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. -
hideFromEMI
Removes this item from the EMI sidebar. Does not remove from recipes. -
getContainerItem
-
hasContainerItem
public boolean hasContainerItem()True if this Item has a container item (a.k.a. crafting result) -
getStatName
-
getItemStackDisplayName
-
getColorFromItemStack
-
onUpdate
public void onUpdate(ItemStack stack, World world, EntityPlayer entity, int iInventorySlot, boolean bIsHandHeldItem) 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
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
returns the action that specifies what animation to play when the items is being used -
getMaxItemUseDuration
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 -
setPotionEffect
Sets the string representing this item's effect on a potion when used as an ingredient. -
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) allows items to add custom lines of information to the mouseover description -
getItemDisplayName
-
hasEffect
-
getRarity
Return an item rarity from EnumRarity -
isItemTool
Checks isDamagable and if it cannot be stacked -
getMovingObjectPositionFromPlayer
protected MovingObjectPosition getMovingObjectPositionFromPlayer(World par1World, EntityPlayer par2EntityPlayer, boolean par3) -
getItemEnchantability
public int getItemEnchantability()Return the enchantability factor of the item, most of the time is based on material. -
requiresMultipleRenderPasses
public boolean requiresMultipleRenderPasses() -
getIconFromDamageForRenderPass
Gets an icon index based on an item's damage value and the given render pass -
getSubItems
returns a list of items with the same ID, but different meta (eg: dye returns 16 items) -
getCreativeTab
gets the CreativeTab this item is displayed on -
setCreativeTab
returns this; -
getModId
Mod ID (same as in fabric.mod.json) of mod that adds this item. -
setModID
Mod ID (same as in fabric.mod.json) of mod that adds this item. -
getIsRepairable
Return whether this item is repairable in an anvil. -
registerIcons
-
canItemBeUsedByPlayer
public boolean canItemBeUsedByPlayer(World world, int i, int j, int k, int iFacing, EntityPlayer player, ItemStack stack) Method which replaces canPlaceItemBlockOnSide() in ItemBlock. Allows the client to prevent item usage before it is relayed to the server by returning false. Only called on client. -
doZombiesConsume
public boolean doZombiesConsume() -
isEfficientVsBlock
-
canHarvestBlock
-
getStrVsBlock
-
isMultiUsePerClick
public boolean isMultiUsePerClick() -
getExhaustionOnUsedToHarvestBlock
public float getExhaustionOnUsedToHarvestBlock(int iBlockID, World world, int i, int j, int k, int iBlockMetadata) -
initializeStackOnGiveCommand
-
updateUsingItem
-
getItemUseWarmupDuration
public int getItemUseWarmupDuration() -
ignoreDamageWhenComparingDuringUse
public boolean ignoreDamageWhenComparingDuringUse() -
getHerbivoreFoodValue
public int getHerbivoreFoodValue(int iItemDamage) -
setHerbivoreFoodValue
-
setAsBasicHerbivoreFood
-
getChickenFoodValue
public int getChickenFoodValue(int iItemDamage) -
setChickenFoodValue
-
setAsBasicChickenFood
-
getPigFoodValue
public int getPigFoodValue(int iItemDamage) -
setPigFoodValue
-
setAsBasicPigFood
-
isWolfFood
public boolean isWolfFood() -
getWolfHealAmount
public int getWolfHealAmount() -
setBuoyancy
-
setBuoyant
-
setNonBuoyant
-
setNeutralBuoyant
-
getBuoyancy
public float getBuoyancy(int iItemDamage) -
setInfernalMaxNumEnchants
-
getInfernalMaxNumEnchants
public int getInfernalMaxNumEnchants() -
setInfernalMaxEnchantmentCost
-
getInfernalMaxEnchantmentCost
public int getInfernalMaxEnchantmentCost() -
isEnchantmentApplicable
-
isConsumedInCrafting
public boolean isConsumedInCrafting() -
isDamagedInCrafting
public boolean isDamagedInCrafting() -
onUsedInCrafting
-
onUsedInCrafting
-
onDamagedInCrafting
-
onBrokenInCrafting
-
getFurnaceBurnTime
public int getFurnaceBurnTime(int iItemDamage) -
setfurnaceburntime
-
setfurnaceburntime
-
getCampfireBurnTime
public int getCampfireBurnTime(int iItemDamage) -
getCanItemStartFireOnUse
public boolean getCanItemStartFireOnUse(int iItemDamage) Used to override default activation behavior on certain blocks like accessing inventory on furnace and campfires -
getCanItemBeSetOnFireOnUse
public boolean getCanItemBeSetOnFireOnUse(int iItemDamage) Used to override default activation behavior on certain blocks like accessing inventory on furnace and campfires -
getCanBeFedDirectlyIntoCampfire
public boolean getCanBeFedDirectlyIntoCampfire(int iItemDamage) -
getCanBeFedDirectlyIntoBrickOven
public boolean getCanBeFedDirectlyIntoBrickOven(int iItemDamage) -
isIncineratedInCrucible
public boolean isIncineratedInCrucible() -
setIncineratedInCrucible
-
setNotIncineratedInCrucible
-
doesConsumeContainerItemWhenCrafted
-
setAllPicksToBeEffectiveVsBlock
-
setAllAxesToBeEffectiveVsBlock
-
setAllShovelsToBeEffectiveVsBlock
-
onItemUsedByBlockDispenser
public boolean onItemUsedByBlockDispenser(ItemStack stack, World world, int i, int j, int k, int iFacing) This method should return true if the item is successfully placed (in which case the BD will consume the corresponding item in its inventory), false otherwise. Co-ordinates specify the BD position. -
hasCustomItemEntity
public boolean hasCustomItemEntity() -
getCustomItemEntity
-
setCustomItemEntity
-
createItemAsEntityInWorld
public EntityItem createItemAsEntityInWorld(World world, double x, double y, double z, ItemStack stack) -
canItemEditBlocks
public boolean canItemEditBlocks()Returns true if players can use this item to affect the world (e.g. placing blocks, placing ender eyes in portal) when not in creative -
getHopperFilterIcon
-
getAnimationIcon
Used to change the item icon the player is holding. Used in bow pulling and casting fishing rod -
getItemAttributeModifiers
public com.google.common.collect.Multimap getItemAttributeModifiers()Gets a map of item attribute modifiers, used by ItemSword to increase hit damage. -
shouldApplyAttributesWhenHeld
public boolean shouldApplyAttributesWhenHeld() -
shouldApplyAttributesWhenWorn
public boolean shouldApplyAttributesWhenWorn() -
setTextureName
-
getIconString
Returns the string associated with this Item's Icon.
-