mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-20 17:46: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 c73bf7d8c6b009ed5e1f666600d3c470927f564d..2af673fe240fbb0ce7667e207a833d09afa7074b 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -1931,6 +1931,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
});
|
|
optional1.ifPresent((holder) -> {
|
|
this.getServer().execute(() -> {
|
|
+ // Paper start
|
|
+ if (optional.isEmpty() && this.getPoiManager().exists(blockposition1, poiType -> true)) {
|
|
+ this.getPoiManager().remove(blockposition1);
|
|
+ }
|
|
+ // Paper end
|
|
this.getPoiManager().add(blockposition1, holder);
|
|
DebugPackets.sendPoiAddedPacket(this, blockposition1);
|
|
});
|