mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
make hammer check tool type
This commit is contained in:
1 parent
4ec44d13df
commit
9bb62789bc
1 file changed
+3
-1
@@ -290,7 +290,9 @@ public class Hammer extends HarvestTool
|
||||
{
|
||||
Block localBlock = world.getBlock(xPos, yPos, zPos);
|
||||
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = block.getHarvestLevel(meta);
|
||||
int hlvl = -1;
|
||||
if (block.getHarvestTool(meta).equals(this.getHarvestType()))
|
||||
hlvl = block.getHarvestLevel(meta);
|
||||
float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, xPos, yPos, zPos);
|
||||
|
||||
if (hlvl <= toolLevel && localHardness - 1.5 <= blockHardness)
|
||||
|
||||
Reference in new issue
Block a user