public class ItemTool extends Item
Item.ToolMaterial
Modifier and Type | Field and Description |
---|---|
protected float |
efficiencyOnProperMaterial |
protected Item.ToolMaterial |
toolMaterial
The material this tool is made from.
|
bFull3D, canRepair, field_111210_e, hasSubtypes, iconString, itemIcon, itemRand, itemRegistry, maxStackSize
Modifier | Constructor and Description |
---|---|
protected |
ItemTool(float p_i45333_1_,
Item.ToolMaterial p_i45333_2_,
java.util.Set p_i45333_3_) |
Modifier and Type | Method and Description |
---|---|
float |
func_150893_a(ItemStack p_150893_1_,
Block p_150893_2_) |
Item.ToolMaterial |
func_150913_i() |
float |
getDigSpeed(ItemStack stack,
Block block,
int meta)
Metadata-sensitive version of getStrVsBlock
|
int |
getHarvestLevel(ItemStack stack,
java.lang.String toolClass)
Queries the harvest level of this item stack for the specifred tool class,
Returns -1 if this tool is not of the specified type
|
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.
|
int |
getItemEnchantability()
Return the enchantability factor of the item, most of the time is based on material.
|
java.util.Set<java.lang.String> |
getToolClasses(ItemStack stack) |
java.lang.String |
getToolMaterialName()
Return the name for this tool's material.
|
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 |
isFull3D()
Returns True is the item is renderer in full 3D when hold.
|
boolean |
onBlockDestroyed(ItemStack p_150894_1_,
World p_150894_2_,
Block p_150894_3_,
int p_150894_4_,
int p_150894_5_,
int p_150894_6_,
EntityLivingBase p_150894_7_) |
addInformation, canHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, doesSneakBypassUse, func_150897_b, getArmorModel, getArmorTexture, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDisplayDamage, getEntityLifespan, getFontRenderer, getHasSubtypes, getIcon, getIcon, getIconFromDamage, getIconFromDamageForRenderPass, getIconIndex, getIconString, getIdFromItem, getItemById, getItemFromBlock, getItemStackDisplayName, getItemStackLimit, getItemStackLimit, getItemUseAction, getMaxDamage, getMaxDamage, getMaxItemUseDuration, getMetadata, getMovingObjectPositionFromPlayer, getPotionEffect, getRarity, getRenderPasses, getShareTag, getSmeltingExperience, getSpriteNumber, getSubItems, getUnlocalizedName, getUnlocalizedName, getUnlocalizedNameInefficiently, hasContainerItem, hasContainerItem, hasCustomEntity, hasEffect, hasEffect, isBookEnchantable, isDamageable, isDamaged, isItemTool, isMap, isPotionIngredient, isRepairable, isValidArmor, itemInteractionForEntity, onArmorTick, onBlockStartBreak, onCreated, onDroppedByPlayer, onEaten, onEntityItemUpdate, onEntitySwing, onItemRightClick, onItemUse, onItemUseFirst, onLeftClickEntity, onPlayerStoppedUsing, onUpdate, onUsingTick, registerIcons, registerItems, renderHelmetOverlay, requiresMultipleRenderPasses, setContainerItem, setCreativeTab, setDamage, setFull3D, setHarvestLevel, setHasSubtypes, setMaxDamage, setMaxStackSize, setNoRepair, setPotionEffect, setTextureName, setUnlocalizedName, shouldRotateAroundWhenRendering
protected float efficiencyOnProperMaterial
protected Item.ToolMaterial toolMaterial
protected ItemTool(float p_i45333_1_, Item.ToolMaterial p_i45333_2_, java.util.Set p_i45333_3_)
public float func_150893_a(ItemStack p_150893_1_, Block p_150893_2_)
func_150893_a
in class Item
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
public boolean onBlockDestroyed(ItemStack p_150894_1_, World p_150894_2_, Block p_150894_3_, int p_150894_4_, int p_150894_5_, int p_150894_6_, EntityLivingBase p_150894_7_)
onBlockDestroyed
in class Item
public boolean isFull3D()
public Item.ToolMaterial func_150913_i()
public int getItemEnchantability()
getItemEnchantability
in class Item
public java.lang.String getToolMaterialName()
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
getIsRepairable
in class Item
public com.google.common.collect.Multimap getItemAttributeModifiers()
getItemAttributeModifiers
in class Item
public int getHarvestLevel(ItemStack stack, java.lang.String toolClass)
Item
getHarvestLevel
in class Item
stack
- This item stack instancetoolClass
- Tool Classpublic java.util.Set<java.lang.String> getToolClasses(ItemStack stack)
getToolClasses
in class Item
public float getDigSpeed(ItemStack stack, Block block, int meta)
Item
getDigSpeed
in class Item
stack
- The Item Stackblock
- The block the item is trying to breakmeta
- The items current metadata