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