mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-22 00:17:37 +01:00
Fix handshake packet transfer handling (#4317)
This commit is contained in:
parent
ce26107730
commit
e41e8dfd63
@ -130,6 +130,10 @@ public class InitialBaseProtocol extends AbstractProtocol<BaseClientboundPacket,
|
||||
wrapper.set(Types.VAR_INT, 0, serverProtocol.getOriginalVersion());
|
||||
}
|
||||
|
||||
if (state == TRANSFER_INTENT && serverProtocol.olderThan(ProtocolVersion.v1_20_5)) {
|
||||
wrapper.set(Types.VAR_INT, 1, LOGIN_INTENT);
|
||||
}
|
||||
|
||||
// Send client intention into the pipeline in case protocols down the line need to transform it
|
||||
try {
|
||||
final List<Protocol> protocols = new ArrayList<>(pipeline.pipes());
|
||||
@ -148,14 +152,8 @@ public class InitialBaseProtocol extends AbstractProtocol<BaseClientboundPacket,
|
||||
// Set initial state
|
||||
if (state == STATUS_INTENT) {
|
||||
info.setState(State.STATUS);
|
||||
} else if (state == LOGIN_INTENT) {
|
||||
} else if (state == LOGIN_INTENT || state == TRANSFER_INTENT) {
|
||||
info.setState(State.LOGIN);
|
||||
} else if (state == TRANSFER_INTENT) {
|
||||
info.setState(State.LOGIN);
|
||||
|
||||
if (serverProtocol.olderThan(ProtocolVersion.v1_20_5)) {
|
||||
wrapper.set(Types.VAR_INT, 1, LOGIN_INTENT);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user