mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 21:20:06 +00:00
Add correct isEffective implementation to DualHarvestTool.
This commit is contained in:
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 ()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user