mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-10-06 05:57:56 +02:00
Change immediaterespawn flag on gamestate change
This commit is contained in:
parent
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
|
||||
|
Loading…
Reference in New Issue
Block a user