Fixed the terra shatterer breaking unbreakable blocks. Closes #483.

So it seems that forge decides that the getPlayerRelativeBlockHardness function should truncate values to 0 if they fall below. 0 specifies an instant break block whereas -1 specifies an unbreakable block. Weird way to handle it.
This commit is contained in:
Lizbeth Rika committed 2015-01-19 16:54:36 +00:00
1 parent 4d08718e43
commit 55675c5fec
1 file changed
+1 -1
@@ -66,7 +66,7 @@ public final class ToolCommons {
return;
Material mat = world.getBlock(x, y, z).getMaterial();
if(!world.isRemote && blk != null && !blk.isAir(world, x, y, z) && blk.getPlayerRelativeBlockHardness(player, world, x, y, z) >= 0) {
if(!world.isRemote && blk != null && !blk.isAir(world, x, y, z) && blk.getPlayerRelativeBlockHardness(player, world, x, y, z) > 0) {
new ArrayList();
if(!blk.canHarvestBlock(player, meta) || !isRightMaterial(mat, materialsListing))