Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-27 08:30:10 +01:00
Fix explosion block desync (#131)
Dieser Commit ist enthalten in:
Ursprung
1c82d51734
Commit
3ecf898d0a
@ -48,7 +48,6 @@ public class Protocol1_13_2To1_14 extends BackwardsProtocol {
|
|||||||
registerOutgoing(State.PLAY, 0x1A, 0x1B);
|
registerOutgoing(State.PLAY, 0x1A, 0x1B);
|
||||||
registerOutgoing(State.PLAY, 0x1B, 0x1C);
|
registerOutgoing(State.PLAY, 0x1B, 0x1C);
|
||||||
registerOutgoing(State.PLAY, 0x54, 0x1D);
|
registerOutgoing(State.PLAY, 0x54, 0x1D);
|
||||||
registerOutgoing(State.PLAY, 0x1C, 0x1E);
|
|
||||||
registerOutgoing(State.PLAY, 0x1E, 0x20);
|
registerOutgoing(State.PLAY, 0x1E, 0x20);
|
||||||
registerOutgoing(State.PLAY, 0x20, 0x21);
|
registerOutgoing(State.PLAY, 0x20, 0x21);
|
||||||
|
|
||||||
|
@ -483,6 +483,30 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Explosion
|
||||||
|
protocol.registerOutgoing(State.PLAY, 0x1C, 0x1E, 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 = (float) Math.floor(coord);
|
||||||
|
wrapper.set(Type.FLOAT, i, coord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//Chunk
|
//Chunk
|
||||||
protocol.registerOutgoing(State.PLAY, 0x21, 0x22, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x21, 0x22, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren