geforkt von Mirrors/Paper
dcc290167f
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: dea9ce0a SPIGOT-7198: Add Sittable interface to Camel CraftBukkit Changes: eecb4c0dc SPIGOT-7196: Exception loading alternate worlds 0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel 676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg e85280e02 Handle missing SpawnEggs in MetaSpawnEgg Spigot Changes: d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator
20 Zeilen
1.4 KiB
Diff
20 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
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 5d3047a420efe59063e90bfc7b42392127e0ad7d..7c4a2f8bb3efd11db2f8711952cc26a067c6d56b 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<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");
|
|
}
|
|
}
|