From ee8db01f1c80a12ae59e3f20445a7ff0f972c572 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 11 Nov 2018 21:10:37 +0000 Subject: [PATCH] Don't allow digging into unloaded chunks --- ...t-allow-digging-into-unloaded-chunks.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch diff --git a/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch b/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch new file mode 100644 index 0000000000..a5c6a14c6b --- /dev/null +++ b/Spigot-Server-Patches/Don-t-allow-digging-into-unloaded-chunks.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sun, 11 Nov 2018 21:01:09 +0000 +Subject: [PATCH] Don't allow digging into unloaded chunks + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index 4c1f17f82..3427e95e6 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + case START_DESTROY_BLOCK: + case ABORT_DESTROY_BLOCK: + case STOP_DESTROY_BLOCK: ++ // Paper start - Don't allow digging in unloaded chunks ++ if (!worldserver.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, true)) { ++ return; ++ } ++ // Paper end - Don't allow digging in unloaded chunks + double d0 = this.player.locX - ((double) blockposition.getX() + 0.5D); + double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D; + double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D); +-- \ No newline at end of file