From 1f33864dae6efc9cdc362d9ec2012c29a7cd117f Mon Sep 17 00:00:00 2001 From: Hea3veN Date: Fri, 5 Jun 2015 20:00:48 -0300 Subject: [PATCH] fix picker robot hanging on unreachable items --- buildcraft_resources/changelog/7.0.6 | 1 + common/buildcraft/robotics/ai/AIRobotFetchItem.java | 1 + common/buildcraft/robotics/ai/AIRobotGotoBlock.java | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/buildcraft_resources/changelog/7.0.6 b/buildcraft_resources/changelog/7.0.6 index 22bd26f5..f4affd64 100644 --- a/buildcraft_resources/changelog/7.0.6 +++ b/buildcraft_resources/changelog/7.0.6 @@ -34,3 +34,4 @@ Bugs fixed: * Fix some robots not going to sleep if they fail to equip items (hea3ven) * Fix rendering issues with pipe contents after a texture reload (asie) * Fix crash upon new config file generation (asie) +* Fix picker robot hanging on unreachable items (hea3ven) diff --git a/common/buildcraft/robotics/ai/AIRobotFetchItem.java b/common/buildcraft/robotics/ai/AIRobotFetchItem.java index ba9cef99..5309629f 100755 --- a/common/buildcraft/robotics/ai/AIRobotFetchItem.java +++ b/common/buildcraft/robotics/ai/AIRobotFetchItem.java @@ -84,6 +84,7 @@ public class AIRobotFetchItem extends AIRobot { if (!ai.success()) { robot.unreachableEntityDetected(target); + setSuccess(false); terminate(); } } diff --git a/common/buildcraft/robotics/ai/AIRobotGotoBlock.java b/common/buildcraft/robotics/ai/AIRobotGotoBlock.java index 1510a780..5a07c942 100755 --- a/common/buildcraft/robotics/ai/AIRobotGotoBlock.java +++ b/common/buildcraft/robotics/ai/AIRobotGotoBlock.java @@ -65,9 +65,9 @@ public class AIRobotGotoBlock extends AIRobotGoto { if (path == null && pathSearch == null) { pathSearch = new PathFinding(robot.worldObj, new BlockIndex((int) Math.floor(robot.posX), (int) Math.floor(robot.posY), (int) Math.floor(robot.posZ)), new BlockIndex( - (int) Math.floor(finalX), (int) Math.floor(finalY), (int) Math.floor(finalZ)), maxDistance); + (int) Math.floor(finalX), (int) Math.floor(finalY), (int) Math.floor(finalZ)), maxDistance, 96); - pathSearchJob = new IterableAlgorithmRunner(pathSearch, 100); + pathSearchJob = new IterableAlgorithmRunner(pathSearch, 50); pathSearchJob.start(); } else if (path != null) { double distance = robot.getDistance(nextX, nextY, nextZ);