From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Shane Freeder 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 e404203a6f330131cab38f7861bff9676fe5c52c..ec583ee3b9e0ffed230f219283e384035e73828d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1787,6 +1787,11 @@ public class ServerLevel extends Level implements WorldGenLevel { }); optional1.ifPresent((villageplacetype) -> { this.getServer().execute(() -> { + // Paper start + if (!optional.isPresent() && this.getPoiManager().exists(blockposition1, com.google.common.base.Predicates.alwaysTrue())) { + this.getPoiManager().remove(blockposition1); + } + // Paper end this.getPoiManager().add(blockposition1, villageplacetype); DebugPackets.sendPoiAddedPacket(this, blockposition1); });