From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 6 Nov 2022 22:35:51 +0000 Subject: [PATCH] Prevent compass from loading chunks diff --git a/src/main/java/net/minecraft/world/item/CompassItem.java b/src/main/java/net/minecraft/world/item/CompassItem.java index de09d93a4d1bce83e46a0d35416218d0d71f47d5..572785e8515576b30116cd7704805d3745caa35a 100644 --- a/src/main/java/net/minecraft/world/item/CompassItem.java +++ b/src/main/java/net/minecraft/world/item/CompassItem.java @@ -77,7 +77,7 @@ public class CompassItem extends Item implements Vanishable { Optional> 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"); } }