Skip to content

Commit

Permalink
Fix wandering within regions
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Feb 12, 2020
1 parent 5fc7e4b commit 23f1191
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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);
Expand Down

0 comments on commit 23f1191

Please sign in to comment.