Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
SFort committed Nov 29, 2023
1 parent a17d280 commit 9e5ec25
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ public class OldLoginPacketServerMixin {
@Inject(method="readPayload(ILnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/network/packet/c2s/login/LoginQueryResponsePayload;", at=@At("HEAD"), cancellable=true)
private static void oldPayload(int queryId, PacketByteBuf buf, CallbackInfoReturnable<LoginQueryResponsePayload> cir){
if (queryId == 41809950 || queryId == 41809951 || queryId == 41809952) {
buf.skipBytes(1);
cir.setReturnValue(new OldCustomPayload.LoginResponse(buf));
if (buf.readBoolean()) {
cir.setReturnValue(new OldCustomPayload.LoginResponse(buf));
} else {
cir.setReturnValue(new OldCustomPayload.LoginResponse(new Identifier("ocaip_null", "vanilla_client"), null));
}
}
}
}

0 comments on commit 9e5ec25

Please sign in to comment.