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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/item/CompassItem.java +++ b/src/main/java/net/minecraft/world/item/CompassItem.java @@ -0,0 +0,0 @@ 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"); } }