aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0492-Remove-stale-POIs.patch
diff options
context:
space:
mode:
authorOwen <[email protected]>2024-03-03 17:05:34 -0500
committerGitHub <[email protected]>2024-03-03 17:05:34 -0500
commit89d51d5f298cd25d6f44388970596c6780b5664b (patch)
tree07f41f4ce7bc466ea5e35faa2575d0ec6f6c4a76 /patches/server/0492-Remove-stale-POIs.patch
parentb21eb4d9a4d0d0bea857675e2186657592df548e (diff)
downloadPaper-89d51d5f298cd25d6f44388970596c6780b5664b.tar.gz
Paper-89d51d5f298cd25d6f44388970596c6780b5664b.zip
Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
Diffstat (limited to 'patches/server/0492-Remove-stale-POIs.patch')
-rw-r--r--patches/server/0492-Remove-stale-POIs.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/patches/server/0492-Remove-stale-POIs.patch b/patches/server/0492-Remove-stale-POIs.patch
new file mode 100644
index 0000000000..ca376b9ba7
--- /dev/null
+++ b/patches/server/0492-Remove-stale-POIs.patch
@@ -0,0 +1,22 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+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 283f686364691f54d9e9e925b33238526de74219..a2113c01d8ea3da13efbf4f0b23460e7fa4e8c68 100644
+--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
+@@ -1795,6 +1795,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
+ });
+ 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);
+ });