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 6708ac20478264889ea92f953afcbd9f4098d08e..ff1ad929cb4494c7a97fe5e240421e25b7ff0857 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1749,6 +1749,11 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl }); 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); });