aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0166-Fix-block-break-desync.patch
blob: c9f7e09cbe6124eea012f19eba2248a8df19a07d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 5ae8df3009225b24837b764e02db1f24fd6ad265 Mon Sep 17 00:00:00 2001
From: Michael Himing <mhiming@gmail.com>
Date: Sun, 8 Jan 2017 18:50:35 +1100
Subject: [PATCH] Fix block break desync


diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1c4842a263..05cc5afea6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1136,6 +1136,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
             double d3 = d0 * d0 + d1 * d1 + d2 * d2;
 
             if (d3 > 36.0D) {
+                if (worldserver.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, true)) // Paper - Fix block break desync - Don't send for unloaded chunks
+                    this.sendPacket(new PacketPlayOutBlockChange(worldserver, blockposition)); // Paper - Fix block break desync
                 return;
             } else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) {
                 return;
-- 
2.21.0