From 92195ceb571dca50a6dc5e53b6a2ebc2c4156f52 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 25 Jun 2016 21:34:09 -0500 Subject: [PATCH] Update upstream CB Doesn't change anything except puts the last commit upstream, where it belongs because we're nice like that, or something --- ...e-clients-when-setting-blocks-to-air.patch | 31 ------------------- work/CraftBukkit | 2 +- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 Spigot-Server-Patches/0165-Update-clients-when-setting-blocks-to-air.patch diff --git a/Spigot-Server-Patches/0165-Update-clients-when-setting-blocks-to-air.patch b/Spigot-Server-Patches/0165-Update-clients-when-setting-blocks-to-air.patch deleted file mode 100644 index 088df95bcb..0000000000 --- a/Spigot-Server-Patches/0165-Update-clients-when-setting-blocks-to-air.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 290cbb38a943a5bb021e5aace7bf3c0cd97f1410 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Sat, 25 Jun 2016 21:04:05 -0500 -Subject: [PATCH] Update clients when setting blocks to air - -In fixing SPIGOT-611, the server sets an area to air and doesn't update the clients. -Usually this is fine, most of the time we'll just be setting the intended block shortly after anyway. - -Except if we're setting air. In which case the server will not send the change because it already sees the block as set. -We workaround this by telling the server to send the client the block change if it is of ID 0 (Air). I assume this -patch will not last long enough to warrant moving away from the ID. - -diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index a5d6f1d..60a1692 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -137,7 +137,10 @@ public class CraftBlock implements Block { - BlockPosition position = new BlockPosition(x, y, z); - - // SPIGOT-611: need to do this to prevent glitchiness. Easier to handle this here (like /setblock) than to fix weirdness in tile entity cleanup -- chunk.getHandle().getWorld().setTypeAndData(position, Blocks.AIR.getBlockData(), 0); -+ // Paper start - If we're setting air, we need to explicitly tell it to send to clients -+ int flag = (type == 0) ? 2 : 0; -+ chunk.getHandle().getWorld().setTypeAndData(position, Blocks.AIR.getBlockData(), flag); -+ // Paper end - - if (applyPhysics) { - return chunk.getHandle().getWorld().setTypeAndData(position, blockData, 3); --- -2.9.0.windows.1 - diff --git a/work/CraftBukkit b/work/CraftBukkit index 4c1e9342cb..568e27fbd0 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 4c1e9342cbe16f4c83d9360e3a21283d3fd80e50 +Subproject commit 568e27fbd08cf5717ff23f01cc57c37f83ec8218