mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Adjust unloaded chunk check for block digging
This commit is contained in:
@@ -1145,7 +1145,7 @@
|
|||||||
case ABORT_DESTROY_BLOCK:
|
case ABORT_DESTROY_BLOCK:
|
||||||
case STOP_DESTROY_BLOCK:
|
case STOP_DESTROY_BLOCK:
|
||||||
+ // Paper start - Don't allow digging into unloaded chunks
|
+ // Paper start - Don't allow digging into unloaded chunks
|
||||||
+ if (this.player.level().getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4) == null) {
|
+ if (this.player.level().getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4) == null || !this.player.canInteractWithBlock(pos, 1.0)) {
|
||||||
+ this.player.connection.ackBlockChangesUpTo(packet.getSequence());
|
+ this.player.connection.ackBlockChangesUpTo(packet.getSequence());
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
|
Reference in New Issue
Block a user