Skip to content

Commit

Permalink
Made the hammer respect mining levels of the adjacent blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Glassmaker committed Feb 15, 2014
1 parent b261bc4 commit da752a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/tconstruct/items/tools/Hammer.java
Expand Up @@ -291,8 +291,8 @@ public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPl
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)
Expand Down

0 comments on commit da752a3

Please sign in to comment.