PaperMC/patches/server/0464-Remove-stale-POIs.patch

23 lines
1.2 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 9 Jan 2021 14:17:07 +0100
Subject: [PATCH] Remove stale POIs
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
2024-10-23 19:46:06 +02:00
index a3ce6feff0826dcfb2a11b0f6cd01a5368c2de3a..d62d6a345837e1b63c1a1393f18e367ac0ef4c30 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
2024-10-23 19:46:06 +02:00
@@ -1805,6 +1805,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
});
2022-06-08 09:30:41 +02:00
optional1.ifPresent((holder) -> {
this.getServer().execute(() -> {
+ // Paper start - Remove stale POIs
2021-11-24 19:27:25 +01:00
+ if (optional.isEmpty() && this.getPoiManager().exists(blockposition1, poiType -> true)) {
+ this.getPoiManager().remove(blockposition1);
+ }
+ // Paper end - Remove stale POIs
2022-06-08 09:30:41 +02:00
this.getPoiManager().add(blockposition1, holder);
DebugPackets.sendPoiAddedPacket(this, blockposition1);
});