Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-09-07 21:32:52 +02:00
Change immediaterespawn flag on gamestate change
Dieser Commit ist enthalten in:
Ursprung
de2c3b3719
Commit
5d8f86e9eb
@ -169,7 +169,6 @@ public class Protocol1_14_4To1_15 extends BackwardsProtocol {
|
||||
registerOutgoing(State.PLAY, 0x1C, 0x1B);
|
||||
registerOutgoing(State.PLAY, 0x1D, 0x1C);
|
||||
registerOutgoing(State.PLAY, 0x1E, 0x1D);
|
||||
registerOutgoing(State.PLAY, 0x1F, 0x1E);
|
||||
registerOutgoing(State.PLAY, 0x20, 0x1F);
|
||||
registerOutgoing(State.PLAY, 0x21, 0x20);
|
||||
registerOutgoing(State.PLAY, 0x25, 0x24);
|
||||
|
@ -46,6 +46,23 @@ public class EntityPackets1_15 extends EntityRewriter<Protocol1_14_4To1_15> {
|
||||
}
|
||||
});
|
||||
|
||||
// Change game state
|
||||
protocol.registerOutgoing(State.PLAY, 0x1F, 0x1E, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.UNSIGNED_BYTE);
|
||||
map(Type.FLOAT);
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
if (wrapper.get(Type.UNSIGNED_BYTE, 0) == 11) {
|
||||
wrapper.user().get(ImmediateRespawn.class).setImmediateRespawn(wrapper.get(Type.FLOAT, 0) == 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Spawn Object
|
||||
protocol.registerOutgoing(State.PLAY, 0x00, 0x00, new PacketRemapper() {
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren