Merge pull request #2558 from Kubuxu/robots-fix1
Potential fix for block breaking robots hanging up on air blocks.
This commit is contained in:
commit
591b7e9908
1 changed files with 16 additions and 11 deletions
|
@ -56,6 +56,11 @@ public class AIRobotBreak extends AIRobot {
|
|||
|
||||
@Override
|
||||
public void update() {
|
||||
|
||||
if (block == null || block.isAir(robot.worldObj, blockToBreak.x, blockToBreak.y, blockToBreak.z)) {
|
||||
terminate();
|
||||
}
|
||||
|
||||
if (hardness != 0) {
|
||||
blockDamage += speed / hardness / 30F;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue