From 55675c5fec3dfe9bcc53c878b0d48fbb236a969c Mon Sep 17 00:00:00 2001 From: Lizbeth Rika Date: Mon, 19 Jan 2015 16:54:36 +0000 Subject: [PATCH] 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. --- .../vazkii/botania/common/item/equipment/tool/ToolCommons.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/vazkii/botania/common/item/equipment/tool/ToolCommons.java b/src/main/java/vazkii/botania/common/item/equipment/tool/ToolCommons.java index ac3eec165..0c7d15525 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/tool/ToolCommons.java +++ b/src/main/java/vazkii/botania/common/item/equipment/tool/ToolCommons.java @@ -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))