mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
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:
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))
|
||||
|
||||
Reference in new issue
Block a user