fix: transfer state never actually getting sent to the server
since we are making a new Session once we reconnect, and we also didn't migrate the old flags, setting CLIENT_TRANSFERRING to true doesn't mean anything
This commit is contained in:
parent
dd629d1dfa
commit
d9e22906ef
2 changed files with 6 additions and 6 deletions
|
@ -1 +1 @@
|
|||
2215
|
||||
2216
|
|
@ -194,6 +194,11 @@ public class Bot extends SessionAdapter {
|
|||
|
||||
this.session = session;
|
||||
|
||||
// this is still needed since MinecraftProtocol will use this flag to set the
|
||||
// handshake intention to transfer, it will be set back to false at
|
||||
// login success
|
||||
session.setFlag(BuiltinFlags.CLIENT_TRANSFERRING, isTransferring);
|
||||
|
||||
session.setFlag(MinecraftConstants.FOLLOW_TRANSFERS, false); // we have our own transfer handler
|
||||
|
||||
session.setFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, options.resolveSRV);
|
||||
|
@ -274,11 +279,6 @@ public class Bot extends SessionAdapter {
|
|||
public void packetReceived (ClientboundTransferPacket ignoredPacket) {
|
||||
this.isTransferring = true;
|
||||
|
||||
// this is still needed since MinecraftProtocol will use this flag to set the
|
||||
// handshake intention to transfer, it will be set back to false at
|
||||
// login success
|
||||
session.setFlag(BuiltinFlags.CLIENT_TRANSFERRING, true);
|
||||
|
||||
session.disconnect(Component.translatable("disconnect.transfer"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue