If context.player() returns none we don't want to use its position for pruning.

This commit is contained in:
scorbett123 2022-03-16 20:12:56 +00:00
parent 8c2aae2ddc
commit e036f5360c
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}
}