--- a/net/minecraft/world/item/CompassItem.java
+++ b/net/minecraft/world/item/CompassItem.java
@@ -77,7 +77,7 @@
                 Optional<ResourceKey<Level>> optional = getLodestoneDimension(compoundTag);
                 if (optional.isPresent() && optional.get() == world.dimension() && compoundTag.contains("LodestonePos")) {
                     BlockPos blockPos = NbtUtils.readBlockPos(compoundTag.getCompound("LodestonePos"));
-                    if (!world.isInWorldBounds(blockPos) || !((ServerLevel)world).getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos)) {
+                    if (!world.isInWorldBounds(blockPos) || (world.hasChunkAt(blockPos) && !((ServerLevel)world).getPoiManager().existsAtPosition(PoiTypes.LODESTONE, blockPos))) { // Paper
                         compoundTag.remove("LodestonePos");
                     }
                 }
