mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-02-22 14:41:57 +01:00
* fix explosion block desync, fixes #1365 * Remove unused import
This commit is contained in:
parent
28e8339a32
commit
7cb4e1d00e
@ -37,7 +37,6 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
||||
registerOutgoing(State.PLAY, 0x1B, 0x1A);
|
||||
registerOutgoing(State.PLAY, 0x1C, 0x1B);
|
||||
registerOutgoing(State.PLAY, 0x1D, 0x54);
|
||||
registerOutgoing(State.PLAY, 0x1E, 0x1C);
|
||||
registerOutgoing(State.PLAY, 0x1F, 0x1D);
|
||||
registerOutgoing(State.PLAY, 0x20, 0x1E);
|
||||
registerOutgoing(State.PLAY, 0x21, 0x20);
|
||||
|
@ -123,6 +123,30 @@ public class WorldPackets {
|
||||
}
|
||||
});
|
||||
|
||||
// Explosion
|
||||
protocol.registerOutgoing(State.PLAY, 0x1E, 0x1C, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.FLOAT); // X
|
||||
map(Type.FLOAT); // Y
|
||||
map(Type.FLOAT); // Z
|
||||
map(Type.FLOAT); // Radius
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
float coord = wrapper.get(Type.FLOAT, i);
|
||||
|
||||
if (coord < 0f) {
|
||||
coord = (int) coord;
|
||||
wrapper.set(Type.FLOAT, i, coord);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Chunk
|
||||
protocol.registerOutgoing(State.PLAY, 0x22, 0x21, new PacketRemapper() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user