2020-04-12 00:39:21 +00:00
|
|
|
From 3d0505501e290200e593976d9619ba105ce59ae8 Mon Sep 17 00:00:00 2001
|
2019-07-20 04:01:24 +00:00
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
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
|
2020-04-02 21:07:06 +00:00
|
|
|
index bde60377ee..b21fca9e5c 100644
|
2019-07-20 04:01:24 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2020-02-09 00:32:48 +00:00
|
|
|
@@ -1272,6 +1272,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
2019-07-20 04:01:24 +00:00
|
|
|
case START_DESTROY_BLOCK:
|
|
|
|
case ABORT_DESTROY_BLOCK:
|
|
|
|
case STOP_DESTROY_BLOCK:
|
|
|
|
+ // Paper start - Don't allow digging in unloaded chunks
|
|
|
|
+ if (this.player.world.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) == null) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // Paper end - Don't allow digging in unloaded chunks
|
|
|
|
this.player.playerInteractManager.a(blockposition, packetplayinblockdig_enumplayerdigtype, packetplayinblockdig.c(), this.minecraftServer.getMaxBuildHeight());
|
|
|
|
return;
|
|
|
|
default:
|
|
|
|
--
|
2020-03-15 20:03:36 +00:00
|
|
|
2.25.1
|
2019-07-20 04:01:24 +00:00
|
|
|
|