mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-07 19:31:37 +01:00
Fix empty block on interact (#583)
This commit is contained in:
parent
2633609ccd
commit
517d6a3b7c
@ -92,10 +92,11 @@ public class BlockPlacementListener {
|
||||
final Point placementPosition = blockPosition.add(offsetX, offsetY, offsetZ);
|
||||
|
||||
if (!canPlaceBlock) {
|
||||
// Send a block change with AIR as block to keep the client in sync,
|
||||
// Send a block change with the real block in the instance to keep the client in sync,
|
||||
// using refreshChunk results in the client not being in sync
|
||||
// after rapid invalid block placements
|
||||
player.getPlayerConnection().sendPacket(new BlockChangePacket(placementPosition, Block.AIR));
|
||||
final Block block = instance.getBlock(placementPosition);
|
||||
player.getPlayerConnection().sendPacket(new BlockChangePacket(placementPosition, block));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user