Merge pull request #3327 from scorbett123/fix-chunk-saving-crash
If context.player() returns none we don't want to use its position for pruning.
This commit is contained in:
commit
702d0790bc
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user