From f81541c8db19caf5058902c5ef9b06b28e40cf21 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 10 Jul 2015 09:46:55 +0200 Subject: [PATCH] fix #2877, #2878, add changelog --- buildcraft_resources/changelog/7.0.14 | 10 ++++++++++ .../core/blueprints/BptBuilderBlueprint.java | 6 ++++-- .../buildcraft/robotics/ai/AIRobotGoAndLinkToDock.java | 10 +++++----- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 buildcraft_resources/changelog/7.0.14 diff --git a/buildcraft_resources/changelog/7.0.14 b/buildcraft_resources/changelog/7.0.14 new file mode 100644 index 00000000..4af0bab7 --- /dev/null +++ b/buildcraft_resources/changelog/7.0.14 @@ -0,0 +1,10 @@ +Bugs fixed: + +* [#2878] Robot NPE for robots prior to 7.0.13 fix (asie) +* [#2877] Survival blueprint crash (asie) +* [#2841] Another crash with Oil in the Nether (asie) +* [#2831] Robots sinking through the ground (hea3ven) +* Allow Builders to use arbitrary IPathProviders (asie) +* Block breaking robots sleeping in mid air (hea3ven) +* Incorrect Request Needed Items action name (asie) +* Robots ignoring gate config on their linked station when equipping items (hea3ven) diff --git a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java index c94befc7..732a7cca 100644 --- a/common/buildcraft/core/blueprints/BptBuilderBlueprint.java +++ b/common/buildcraft/core/blueprints/BptBuilderBlueprint.java @@ -265,8 +265,10 @@ public class BptBuilderBlueprint extends BptBuilderBase { private int getBuildListCount() { int out = 0; - for (int i = 0; i < buildStageOccurences.length; i++) { - out += buildStageOccurences[i]; + if (buildStageOccurences != null) { + for (int i = 0; i < buildStageOccurences.length; i++) { + out += buildStageOccurences[i]; + } } return out; } diff --git a/common/buildcraft/robotics/ai/AIRobotGoAndLinkToDock.java b/common/buildcraft/robotics/ai/AIRobotGoAndLinkToDock.java index 10845d71..d83fe543 100755 --- a/common/buildcraft/robotics/ai/AIRobotGoAndLinkToDock.java +++ b/common/buildcraft/robotics/ai/AIRobotGoAndLinkToDock.java @@ -36,7 +36,7 @@ public class AIRobotGoAndLinkToDock extends AIRobot { if (station == robot.getLinkedStation() && station == robot.getDockingStation()) { terminate(); } else { - if (station.takeAsMain(robot)) { + if (station != null && station.takeAsMain(robot)) { startDelegateAI(new AIRobotGotoBlock(robot, station.x() + station.side().offsetX * 2, station.y() + station.side().offsetY * 2, @@ -52,10 +52,10 @@ public class AIRobotGoAndLinkToDock extends AIRobot { public void delegateAIEnded(AIRobot ai) { if (ai instanceof AIRobotGotoBlock) { if (ai.success()) { - startDelegateAI(new AIRobotStraightMoveTo(robot, - station.x() + 0.5F + station.side().offsetX * 0.5F, - station.y() + 0.5F + station.side().offsetY * 0.5F, - station.z() + 0.5F + station.side().offsetZ * 0.5F)); + startDelegateAI(new AIRobotStraightMoveTo(robot, + station.x() + 0.5F + station.side().offsetX * 0.5F, + station.y() + 0.5F + station.side().offsetY * 0.5F, + station.z() + 0.5F + station.side().offsetZ * 0.5F)); } else { terminate(); }