net.minecraft.item

## Class ItemTool

- java.lang.Object
- - net.minecraft.item.Item
  - - net.minecraft.item.ItemTool

- Direct Known Subclasses:
    ItemAxe, ItemPickaxe, ItemSpade

      public class ItemTool
      extends Item

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.minecraft.item.Item

      `Item.ToolMaterial`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected float` | `efficiencyOnProperMaterial`
    `protected Item.ToolMaterial` | `toolMaterial`

    - ### Fields inherited from class net.minecraft.item.Item

      `bFull3D, canRepair, field_111210_e, hasSubtypes, iconString, itemIcon, itemRand, itemRegistry, maxStackSize`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ItemTool(float p_i45333_1_, Item.ToolMaterial p_i45333_2_, java.util.Set p_i45333_3_)`

  - ### Method Summary

    Methods
    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)`
    `com.google.common.collect.Multimap` | `getItemAttributeModifiers()`
    `int` | `getItemEnchantability()`
    `java.util.Set<java.lang.String>` | `getToolClasses(ItemStack stack)`
    `java.lang.String` | `getToolMaterialName()`
    `boolean` | `hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)`
    `boolean` | `isFull3D()`
    `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_)`

    - ### Methods inherited from class net.minecraft.item.Item

      `addInformation, canHarvestBlock, canItemEditBlocks, createEntity, doesContainerItemLeaveCraftingGrid, doesSneakBypassUse, func_150897_b, getArmorModel, getArmorTexture, getAttributeModifiers, getChestGenBase, getColorFromItemStack, getContainerItem, getContainerItem, getCreativeTab, getCreativeTabs, getDamage, getDisplayDamage, getDurabilityForDisplay, 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, showDurabilityBar`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### efficiencyOnProperMaterial

          protected float efficiencyOnProperMaterial

    - #### toolMaterial

          protected Item.ToolMaterial toolMaterial

  - ### Constructor Detail

    - #### ItemTool

          protected ItemTool(float p_i45333_1_,
                  Item.ToolMaterial p_i45333_2_,
                  java.util.Set p_i45333_3_)

  - ### Method Detail

    - #### func_150893_a

          public float func_150893_a(ItemStack p_150893_1_,
                            Block p_150893_2_)

      Overrides:
        `func_150893_a` in class `Item`

    - #### hitEntity

          public boolean hitEntity(ItemStack par1ItemStack,
                          EntityLivingBase par2EntityLivingBase,
                          EntityLivingBase par3EntityLivingBase)

      Overrides:
        `hitEntity` in class `Item`

    - #### onBlockDestroyed

          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_)

      Overrides:
        `onBlockDestroyed` in class `Item`

    - #### isFull3D

          public boolean isFull3D()

      Overrides:
        `isFull3D` in class `Item`

    - #### func_150913_i

          public Item.ToolMaterial func_150913_i()

    - #### getItemEnchantability

          public int getItemEnchantability()

      Overrides:
        `getItemEnchantability` in class `Item`

    - #### getToolMaterialName

          public java.lang.String getToolMaterialName()

    - #### getIsRepairable

          public boolean getIsRepairable(ItemStack par1ItemStack,
                                ItemStack par2ItemStack)

      Overrides:
        `getIsRepairable` in class `Item`

    - #### getItemAttributeModifiers

          public com.google.common.collect.Multimap getItemAttributeModifiers()

      Overrides:
        `getItemAttributeModifiers` in class `Item`

    - #### getHarvestLevel

          public int getHarvestLevel(ItemStack stack,
                            java.lang.String toolClass)

      Description copied from class: `Item`
      Queries the harvest level of this item stack for the specifred tool class, Returns -1 if this tool is not of the specified type
      Overrides:
        `getHarvestLevel` in class `Item`
      Parameters:
        `stack` - This item stack instance
        `toolClass` - Tool Class
      Returns:
        Harvest level, or -1 if not the specified tool type.

    - #### getToolClasses

          public java.util.Set<java.lang.String> getToolClasses(ItemStack stack)

      Overrides:
        `getToolClasses` in class `Item`

    - #### getDigSpeed

          public float getDigSpeed(ItemStack stack,
                          Block block,
                          int meta)

      Description copied from class: `Item`
      Metadata-sensitive version of getStrVsBlock
      Overrides:
        `getDigSpeed` in class `Item`
      Parameters:
        `stack` - The Item Stack
        `block` - The block the item is trying to break
        `meta` - The items current metadata
      Returns:
        The damage strength