Upload files to "/"
This commit is contained in:
@@ -85,7 +85,19 @@ public class PathfindingController {
|
||||
executor.setFlying(flying);
|
||||
|
||||
threadPool.submit(() -> {
|
||||
List<BlockPos> path = AStarPathfinder.find(client.world, start, goal, flying);
|
||||
List<BlockPos> path = AStarPathfinder.find(
|
||||
client.world, start, goal, flying,
|
||||
executor.getBlacklist()
|
||||
);
|
||||
|
||||
// Jeśli nie znalazł z blacklistą — spróbuj bez niej
|
||||
if (path.isEmpty() && !executor.getBlacklist().isEmpty()) {
|
||||
executor.clearBlacklist();
|
||||
path = AStarPathfinder.find(
|
||||
client.world, start, goal, flying,
|
||||
executor.getBlacklist()
|
||||
);
|
||||
}
|
||||
|
||||
if (path.isEmpty()) {
|
||||
status = "No path found";
|
||||
@@ -111,7 +123,7 @@ public class PathfindingController {
|
||||
/** Stop walking immediately. */
|
||||
public void stop() {
|
||||
MinecraftClient client = MinecraftClient.getInstance();
|
||||
executor.stop(client);
|
||||
executor.reset(client);
|
||||
status = "Stopped";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user