--- ../src-base/minecraft/net/minecraft/item/ItemTool.java
+++ ../src-work/minecraft/net/minecraft/item/ItemTool.java
@@ -29,6 +29,18 @@
         this.field_77864_a = p_i45333_2_.func_77998_b();
         this.field_77865_bY = p_i45333_1_ + p_i45333_2_.func_78000_c();
         this.func_77637_a(CreativeTabs.field_78040_i);
+        if (this instanceof ItemPickaxe)
+        {
+            toolClass = "pickaxe";
+        }
+        else if (this instanceof ItemAxe)
+        {
+            toolClass = "axe";
+        }
+        else if (this instanceof ItemSpade)
+        {
+            toolClass = "shovel";
+        }
     }
 
     public float func_150893_a(ItemStack p_150893_1_, Block p_150893_2_)
@@ -84,4 +96,38 @@
         multimap.put(SharedMonsterAttributes.field_111264_e.func_111108_a(), new AttributeModifier(field_111210_e, "Tool modifier", (double)this.field_77865_bY, 0));
         return multimap;
     }
+
+    /*===================================== FORGE START =================================*/
+    private String toolClass;
+    @Override
+    public int getHarvestLevel(ItemStack stack, String toolClass)
+    {
+        int level = super.getHarvestLevel(stack, toolClass);
+        if (level == -1 && toolClass != null && toolClass.equals(this.toolClass))
+        {
+            return this.field_77862_b.func_77996_d();
+        }
+        else
+        {
+            return level;
+        }
+    }
+
+    @Override
+    public Set<String> getToolClasses(ItemStack stack)
+    {
+        return toolClass != null ? com.google.common.collect.ImmutableSet.of(toolClass) : super.getToolClasses(stack);
+    }
+
+    @Override
+    public float getDigSpeed(ItemStack stack, net.minecraft.block.state.IBlockState state)
+    {
+        for (String type : getToolClasses(stack))
+        {
+            if (state.func_177230_c().isToolEffective(type, state))
+                return field_77864_a;
+        }
+        return super.getDigSpeed(stack, state);
+    }
+    /*===================================== FORGE END =================================*/
 }
