#3748: Minecraft 24w38a support

This commit is contained in:
Outfluencer 2024-09-21 01:02:28 +02:00 committed by GitHub
parent a89cf5f36d
commit 9437cedc48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ public class ProtocolConstants
public static final int MINECRAFT_1_20_3 = 765;
public static final int MINECRAFT_1_20_5 = 766;
public static final int MINECRAFT_1_21 = 767;
public static final int MINECRAFT_1_21_2 = 1073742032;
public static final int MINECRAFT_1_21_2 = 1073742034;
public static final List<String> SUPPORTED_VERSIONS;
public static final List<Integer> SUPPORTED_VERSION_IDS;

View File

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