#3658: Minecraft 1.20.5-rc1 support

This commit is contained in:
Outfluencer 2024-04-19 06:58:16 +10:00 committed by md_5
parent 1be25b6c74
commit 67c65e0464
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11
2 changed files with 12 additions and 1 deletions

View File

@ -45,7 +45,7 @@ public class ProtocolConstants
public static final int MINECRAFT_1_20 = 763;
public static final int MINECRAFT_1_20_2 = 764;
public static final int MINECRAFT_1_20_3 = 765;
public static final int MINECRAFT_1_20_5 = 1073742011;
public static final int MINECRAFT_1_20_5 = 1073742013;
public static final List<String> SUPPORTED_VERSIONS;
public static final List<Integer> SUPPORTED_VERSION_IDS;

View File

@ -37,6 +37,11 @@ public class LoginSuccess extends DefinedPacket
{
properties = readProperties( buf );
}
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 )
{
// Whether the client should disconnect on its own if it receives invalid data from the server
buf.readBoolean();
}
}
@Override
@ -54,6 +59,12 @@ public class LoginSuccess extends DefinedPacket
{
writeProperties( properties, buf );
}
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 )
{
// Whether the client should disconnect on its own if it receives invalid data from the server
// Vanilla sends true so we also send true
buf.writeBoolean( true );
}
}
@Override