Class ItemTool

java.lang.Object
net.minecraft.src.Item
net.minecraft.src.ItemTool
Direct Known Subclasses:
ItemAxe, ItemPickaxe, ItemSpade

public class ItemTool extends Item
  • Field Details

    • efficiencyOnProperMaterial

      protected float efficiencyOnProperMaterial
    • toolMaterial

      protected EnumToolMaterial toolMaterial
      The material this tool is made from.
  • Constructor Details

    • ItemTool

      protected ItemTool(int par1, float par2, EnumToolMaterial par3EnumToolMaterial, Block[] par4ArrayOfBlock)
  • Method Details

    • 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
    • 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.
      Overrides:
      hitEntity in class Item
    • onBlockDestroyed

      public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
      Overrides:
      onBlockDestroyed in class Item
    • isFull3D

      public boolean isFull3D()
      Returns True is the item is renderer in full 3D when hold.
      Overrides:
      isFull3D in class Item
    • getItemEnchantability

      public int getItemEnchantability()
      Return the enchantability factor of the item, most of the time is based on material.
      Overrides:
      getItemEnchantability in class Item
    • getToolMaterialName

      public String getToolMaterialName()
      Return the name for this tool's material.
    • getIsRepairable

      public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
      Return whether this item is repairable in an anvil.
      Overrides:
      getIsRepairable in class Item
    • getItemAttributeModifiers

      public com.google.common.collect.Multimap getItemAttributeModifiers()
      Gets a map of item attribute modifiers, used by ItemSword to increase hit damage.
      Overrides:
      getItemAttributeModifiers in class Item
    • getToolMaterial

      public EnumToolMaterial getToolMaterial()