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:
Leijurv authored and GitHub committed 2022-03-31 13:58:11 -07:00
commit 702d0790bc
1 file changed
+1 -1
+1 -1
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();
}
}