Fix block break packet using resultant block (#996)

This commit is contained in:
emortal 2022-04-27 15:14:54 +01:00 committed by GitHub
parent 12543acf5e
commit a78309a2b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ public class InstanceContainer extends Instance {
new BlockHandler.PlayerDestroy(block, this, blockPosition, player));
// Send the block break effect packet
PacketUtils.sendGroupedPacket(chunk.getViewers(),
new EffectPacket(2001 /*Block break + block break sound*/, blockPosition, resultBlock.stateId(), false),
new EffectPacket(2001 /*Block break + block break sound*/, blockPosition, block.stateId(), false),
// Prevent the block breaker to play the particles and sound two times
(viewer) -> !viewer.equals(player));
}
@ -625,4 +625,4 @@ public class InstanceContainer extends Instance {
var dispatcher = MinecraftServer.process().dispatcher();
dispatcher.createPartition(chunk);
}
}
}