Add correct isEffective implementation to DualHarvestTool.

This commit is contained in:
Bernhard Bonigl committed 2014-08-13 11:21:34 +02:00
1 parent 3c218e2551
commit 8f5d065582
1 file changed
+14 -13
@@ -111,20 +111,9 @@ public abstract class DualHarvestTool extends HarvestTool
public boolean func_150897_b (Block block)
{
if (block.getMaterial().isToolNotRequired())
{
return true;
}
for (Material m : getEffectiveMaterials())
{
if (m == block.getMaterial())
return true;
}
for (Material m : getEffectiveSecondaryMaterials())
{
if (m == block.getMaterial())
return true;
}
return false;
return isEffective(block.getMaterial());
}
@Override
@@ -133,6 +122,18 @@ public abstract class DualHarvestTool extends HarvestTool
return func_150897_b(block);
}
@Override
public boolean isEffective(Material material) {
if(super.isEffective(material))
return true;
for(Material m : getEffectiveSecondaryMaterials())
if(m == material)
return true;
return false;
}
@Override
public String[] getTraits ()
{