mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-26 14:33:50 +00:00
Made the hammer respect mining levels of the adjacent blocks
This commit is contained in:
1 parent
b261bc4278
commit
da752a356c
1 file changed
+2
-2
@@ -291,8 +291,8 @@ public class Hammer extends HarvestTool
|
||||
Block localBlock = world.getBlock(xPos, yPos, zPos);
|
||||
int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
|
||||
int hlvl = -1;
|
||||
if (block.getHarvestTool(meta) != null && block.getHarvestTool(meta).equals(this.getHarvestType()))
|
||||
hlvl = block.getHarvestLevel(meta);
|
||||
if (localBlock.getHarvestTool(localMeta) != null && localBlock.getHarvestTool(localMeta).equals(this.getHarvestType()))
|
||||
hlvl = localBlock.getHarvestLevel(localMeta);
|
||||
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