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
This commit is contained in:
Mariell 2020-06-23 01:00:00 +02:00
parent 7ae726ce8d
commit 706761b531

View File

@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ 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;