From 9bb4e93090cd235a73a3903f8ecbb4f3c0d02019 Mon Sep 17 00:00:00 2001 From: Mariell Date: Tue, 23 Jun 2020 01:00:00 +0200 Subject: Fix piston dupe patch creating ghost blocks (#3603) The 2 flag (send change to clients) must always be set. If it is only set when the `map.replace` call before it does something, as was suggested on Discord, the issue will not change whatsoever. Fixes #3593 --- .../0542-Fix-piston-physics-inconsistency-MC-188840.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/0542-Fix-piston-physics-inconsistency-MC-188840.patch b/Spigot-Server-Patches/0542-Fix-piston-physics-inconsistency-MC-188840.patch index 21338460af..91358261da 100644 --- a/Spigot-Server-Patches/0542-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/Spigot-Server-Patches/0542-Fix-piston-physics-inconsistency-MC-188840.patch @@ -46,7 +46,7 @@ index f0284e81db3ab7c45018de2b446f2d8296df15c3..8444819f071b13e98ba07032520016a6 + } } diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java -index 39cd8ab5925ceb9494e0ac910c73338c24ecda2c..f90ac88d33fb6e83eb7bf1e1432df14e452387ec 100644 +index 39cd8ab5925ceb9494e0ac910c73338c24ecda2c..73ac83832121e0390b7c4649681fc247e3d8c30b 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -376,12 +376,24 @@ public class BlockPiston extends BlockDirectional { @@ -71,7 +71,7 @@ index 39cd8ab5925ceb9494e0ac910c73338c24ecda2c..f90ac88d33fb6e83eb7bf1e1432df14e + } + world.setTileEntity(blockposition3, BlockPistonMoving.a(allowDesync ? list1.get(k) : iblockdata1, enumdirection, flag, false)); + if (!allowDesync) { -+ world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block ++ world.setTypeAndData(oldPos, Blocks.AIR.getBlockData(), 2 | 4 | 16 | 1024); // set air to prevent later physics updates from seeing this block + } + // Paper end - fix a variety of piston desync dupes --j; -- cgit v1.2.3