From 3913cb0f7c9b34d1a833ef2991dc1ed6d0ee64ea Mon Sep 17 00:00:00 2001 From: Hea3veN Date: Sun, 14 Dec 2014 10:09:16 -0300 Subject: [PATCH] allow robots to break blocks with hardness 0, fix #2198 --- common/buildcraft/core/robots/AIRobotBreak.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/common/buildcraft/core/robots/AIRobotBreak.java b/common/buildcraft/core/robots/AIRobotBreak.java index 3e1da4d1..bb4e53e3 100644 --- a/common/buildcraft/core/robots/AIRobotBreak.java +++ b/common/buildcraft/core/robots/AIRobotBreak.java @@ -55,14 +55,13 @@ public class AIRobotBreak extends AIRobot { @Override public void update() { - if (hardness == 0) { - // defensive code - terminate(); - return; + if (hardness != 0) { + blockDamage += speed / hardness / 30F; + } else { + // Instantly break the block + blockDamage = 1.1F; } - blockDamage += speed / hardness / 30F; - if (blockDamage > 1.0F) { robot.worldObj.destroyBlockInWorldPartially(robot.getEntityId(), blockToBreak.x, blockToBreak.y, blockToBreak.z, -1);