Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 15:50:10 +01:00
Cancel packets correctly so they don't mess bungee up
Dieser Commit ist enthalten in:
Ursprung
7b1eefb115
Commit
05e056a28b
@ -194,7 +194,18 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
registerIncoming(State.PLAY, -1, 0x02); //Set Difficulty packet added in 19w11a
|
//Set Difficulty packet added in 19w11a
|
||||||
|
registerIncoming(State.PLAY, -1, 0x02, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) {
|
||||||
|
wrapper.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
registerIncoming(State.PLAY, 0x02, 0x03);
|
registerIncoming(State.PLAY, 0x02, 0x03);
|
||||||
registerIncoming(State.PLAY, 0x03, 0x04);
|
registerIncoming(State.PLAY, 0x03, 0x04);
|
||||||
registerIncoming(State.PLAY, 0x04, 0x05);
|
registerIncoming(State.PLAY, 0x04, 0x05);
|
||||||
@ -207,7 +218,19 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
|||||||
|
|
||||||
registerIncoming(State.PLAY, 0x0C, 0x0D);
|
registerIncoming(State.PLAY, 0x0C, 0x0D);
|
||||||
registerIncoming(State.PLAY, 0x0D, 0x0E);
|
registerIncoming(State.PLAY, 0x0D, 0x0E);
|
||||||
registerIncoming(State.PLAY, -1, 0x10); //Lock Difficulty packet added in 19w11a
|
|
||||||
|
//Lock Difficulty packet added in 19w11a
|
||||||
|
registerIncoming(State.PLAY, -1, 0x10, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) {
|
||||||
|
wrapper.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
registerIncoming(State.PLAY, 0x0E, 0x0F);
|
registerIncoming(State.PLAY, 0x0E, 0x0F);
|
||||||
registerIncoming(State.PLAY, 0x0F, 0x14);
|
registerIncoming(State.PLAY, 0x0F, 0x14);
|
||||||
registerIncoming(State.PLAY, 0x10, 0x11);
|
registerIncoming(State.PLAY, 0x10, 0x11);
|
||||||
@ -230,7 +253,18 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
|||||||
|
|
||||||
registerIncoming(State.PLAY, 0x23, 0x25);
|
registerIncoming(State.PLAY, 0x23, 0x25);
|
||||||
|
|
||||||
registerIncoming(State.PLAY, -1, 0x27); //Unknown packet added in 19w13a
|
//Unknown packet added in 19w13a
|
||||||
|
registerIncoming(State.PLAY, -1, 0x27, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) {
|
||||||
|
wrapper.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
registerIncoming(State.PLAY, 0x27, 0x2A);
|
registerIncoming(State.PLAY, 0x27, 0x2A);
|
||||||
registerIncoming(State.PLAY, 0x28, 0x2B);
|
registerIncoming(State.PLAY, 0x28, 0x2B);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren