Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
23 Zeilen
1.2 KiB
Diff
23 Zeilen
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);
|
|
});
|