fix loading break ai from nbt
This commit is contained in:
parent
9a36844a6b
commit
d339d708b3
2 changed files with 16 additions and 2 deletions
|
@ -31,7 +31,8 @@ Improvements:
|
||||||
* Zone Planners now have a dynamic texture (asie)
|
* Zone Planners now have a dynamic texture (asie)
|
||||||
* Requesters now support the Comparator (asie)
|
* Requesters now support the Comparator (asie)
|
||||||
* Add events for robot interaction and removal (asie)
|
* Add events for robot interaction and removal (asie)
|
||||||
* fix robots not using the correct sides when accessing inventories/tanks (hea3ven)
|
* Fix robots not using the correct sides when accessing inventories/tanks (hea3ven)
|
||||||
|
* Fix loading break ai from nbt (hea3ven)
|
||||||
* Transport:
|
* Transport:
|
||||||
* Filtered Buffers now support the Comparator (asie)
|
* Filtered Buffers now support the Comparator (asie)
|
||||||
* Lenses do not require Iron Ingots anymore (asie)
|
* Lenses do not require Iron Ingots anymore (asie)
|
||||||
|
|
|
@ -55,8 +55,21 @@ public class AIRobotBreak extends AIRobot {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
if (block == null || block.isAir(robot.worldObj, blockToBreak.x, blockToBreak.y, blockToBreak.z)) {
|
if (block == null) {
|
||||||
|
block = robot.worldObj.getBlock(blockToBreak.x, blockToBreak.y, blockToBreak.z);
|
||||||
|
if (block == null) {
|
||||||
|
setSuccess(false);
|
||||||
|
terminate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
meta = robot.worldObj.getBlockMetadata(blockToBreak.x, blockToBreak.y, blockToBreak.z);
|
||||||
|
hardness = block.getBlockHardness(robot.worldObj, blockToBreak.x, blockToBreak.y, blockToBreak.z);
|
||||||
|
speed = getBreakSpeed(robot, robot.getHeldItem(), block, meta);
|
||||||
|
}
|
||||||
|
if (block.isAir(robot.worldObj, blockToBreak.x, blockToBreak.y, blockToBreak.z)) {
|
||||||
|
setSuccess(false);
|
||||||
terminate();
|
terminate();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hardness != 0) {
|
if (hardness != 0) {
|
||||||
|
|
Loading…
Reference in a new issue