Minecraft 1.21 support

This commit is contained in:
md_5
2024-06-14 01:05:00 +10:00
parent 006a14a75c
commit 8a88ce464e
21 changed files with 47 additions and 45 deletions

View File

@@ -46,7 +46,7 @@ public class ProtocolConstants
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 = 766;
public static final int MINECRAFT_1_21 = 1073742027;
public static final int MINECRAFT_1_21 = 767;
public static final List<String> SUPPORTED_VERSIONS;
public static final List<Integer> SUPPORTED_VERSION_IDS;
@@ -65,7 +65,8 @@ public class ProtocolConstants
"1.17.x",
"1.18.x",
"1.19.x",
"1.20.x"
"1.20.x",
"1.21.x"
);
ImmutableList.Builder<Integer> supportedVersionIds = ImmutableList.<Integer>builder().add(
ProtocolConstants.MINECRAFT_1_8,
@@ -106,13 +107,14 @@ public class ProtocolConstants
ProtocolConstants.MINECRAFT_1_20,
ProtocolConstants.MINECRAFT_1_20_2,
ProtocolConstants.MINECRAFT_1_20_3,
ProtocolConstants.MINECRAFT_1_20_5
ProtocolConstants.MINECRAFT_1_20_5,
ProtocolConstants.MINECRAFT_1_21
);
if ( SNAPSHOT_SUPPORT )
{
supportedVersions.add( "1.21.x" );
supportedVersionIds.add( ProtocolConstants.MINECRAFT_1_21 );
// supportedVersions.add( "1.21.x" );
// supportedVersionIds.add( ProtocolConstants.MINECRAFT_1_21 );
}
SUPPORTED_VERSIONS = supportedVersions.build();