mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
23 lines
1.2 KiB
Diff
23 lines
1.2 KiB
Diff
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
|
|
index a3ce6feff0826dcfb2a11b0f6cd01a5368c2de3a..d62d6a345837e1b63c1a1393f18e367ac0ef4c30 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -1805,6 +1805,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
|
});
|
|
optional1.ifPresent((holder) -> {
|
|
this.getServer().execute(() -> {
|
|
+ // Paper start - Remove stale POIs
|
|
+ if (optional.isEmpty() && this.getPoiManager().exists(blockposition1, poiType -> true)) {
|
|
+ this.getPoiManager().remove(blockposition1);
|
|
+ }
|
|
+ // Paper end - Remove stale POIs
|
|
this.getPoiManager().add(blockposition1, holder);
|
|
DebugPackets.sendPoiAddedPacket(this, blockposition1);
|
|
});
|