From e036f5360c49819c3fa4c83649bff5a8ad5dc542 Mon Sep 17 00:00:00 2001 From: scorbett123 <50634068+scorbett123@users.noreply.github.com> Date: Wed, 16 Mar 2022 20:12:56 +0000 Subject: [PATCH] If context.player() returns none we don't want to use its position for pruning. --- src/main/java/baritone/cache/CachedWorld.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/cache/CachedWorld.java b/src/main/java/baritone/cache/CachedWorld.java index 1d113246..6b3959fe 100644 --- a/src/main/java/baritone/cache/CachedWorld.java +++ b/src/main/java/baritone/cache/CachedWorld.java @@ -209,7 +209,7 @@ public final class CachedWorld implements ICachedWorld, Helper { private BlockPos guessPosition() { for (IBaritone ibaritone : BaritoneAPI.getProvider().getAllBaritones()) { IWorldData data = ibaritone.getWorldProvider().getCurrentWorld(); - if (data != null && data.getCachedWorld() == this) { + if (data != null && data.getCachedWorld() == this && ibaritone.getPlayerContext().player() != null) { return ibaritone.getPlayerContext().playerFeet(); } }