From 23f11915cbc912b1807d0bfdf3bc4564df04aedd Mon Sep 17 00:00:00 2001 From: fullwall Date: Thu, 13 Feb 2020 00:05:28 +0800 Subject: [PATCH] Fix wandering within regions --- src/main/java/net/citizensnpcs/api/ai/goals/WanderGoal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/citizensnpcs/api/ai/goals/WanderGoal.java b/src/main/java/net/citizensnpcs/api/ai/goals/WanderGoal.java index e3b8f2cb..61e70945 100644 --- a/src/main/java/net/citizensnpcs/api/ai/goals/WanderGoal.java +++ b/src/main/java/net/citizensnpcs/api/ai/goals/WanderGoal.java @@ -55,7 +55,7 @@ private Location findRandomPosition() { Block block = base.getWorld().getBlockAt(x, y, z); if (MinecraftBlockExaminer.canStandOn(block)) { long[] pt = { x, y, z }; - if (tree != null && tree.get() != null && !tree.get().contains(pt, pt)) { + if (tree != null && tree.get() != null && !tree.get().queryIntersect(pt, pt).hasNext()) { continue; } found = block.getLocation().add(0, 1, 0);