Skip to content

Commit

Permalink
make hammer check tool type
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Feb 15, 2014
1 parent 4ec44d1 commit 9bb6278
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/tconstruct/items/tools/Hammer.java
Expand Up @@ -290,7 +290,9 @@ 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 = 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)
Expand Down

0 comments on commit 9bb6278

Please sign in to comment.