Unable to remove BLOCK_BREAK_ANIMATION
8qBITs opened this issue ยท 0 comments
- This issue is not solved in a development build
Describe the bug
After setting BLOCK_BREAK_ANIMATION it cannot be removed by setting its animation to -1
To Reproduce
Steps to reproduce the behavior:
- Create a packet BLOCK_BREAK_ANIMATION with any of 9 animation states from 0 to 9
- Create a new packet with -1 animation state which should remove it.
Expected behavior
Break animation should stop on the block.
Screenshots
https://i.imgur.com/wB9MjjH.png
Version Info
Version 5.1.1 (Older versions were tried with same result.)
https://pastebin.com/E0cncRTF
Additional context
This is how break packet it sent:
public static void sendBreakPacket(int animation, int breakingId, Block block) {
ProtocolManager protocolManager = ProtocolLibrary.getProtocolManager();
PacketContainer packet = protocolManager.createPacket(PacketType.Play.Server.BLOCK_BREAK_ANIMATION);
packet.getIntegers()
.write(0, breakingId)
.write(1, animation);
packet.getBlockPositionModifier().write(0, new BlockPosition(block.getX(), block.getY(), block.getZ()));
protocolManager.broadcastServerPacket(packet);
}
and this is how the break packet animation is removed:
public static void regenerateBlock(Block block, int breakingId) {
sendBreakPacket(-1, breakingId, block);
}