Minecraft 25w37a support

This commit is contained in:
md_5
2025-09-13 09:41:52 +10:00
parent 0be632a4d6
commit d2a317eee2
2 changed files with 55 additions and 28 deletions

View File

@@ -110,7 +110,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x24 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x26 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x27 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x26 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x26 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x2B )
);
TO_CLIENT.registerPacket(
Login.class,
@@ -129,7 +130,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x29 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x2B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x2C ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x2B )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x2B ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x30 )
);
TO_CLIENT.registerPacket(
Chat.class,
@@ -164,7 +166,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x45 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x47 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x4C ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x4B )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x4B ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x50 )
);
TO_CLIENT.registerPacket(
BossBar.class,
@@ -228,7 +231,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x5C ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x5E ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x64 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x63 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x63 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x68 )
);
TO_CLIENT.registerPacket(
ScoreboardScore.class,
@@ -248,7 +252,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x5F ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x61 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x68 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x67 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x67 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x6C )
);
TO_CLIENT.registerPacket(
ScoreboardScoreReset.class,
@@ -256,7 +261,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x42 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x44 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x49 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x48 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x48 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x4D )
);
TO_CLIENT.registerPacket(
ScoreboardDisplay.class,
@@ -276,7 +282,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x55 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x57 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x5C ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x5B )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x5B ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x60 )
);
TO_CLIENT.registerPacket(
Team.class,
@@ -296,7 +303,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x5E ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x60 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x67 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x66 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x66 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x6B )
);
TO_CLIENT.registerPacket(
PluginMessage.class,
@@ -334,7 +342,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_4, 0x1A ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x1B ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x1D ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x1C )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x1C ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x20 )
);
TO_CLIENT.registerPacket(
Title.class,
@@ -356,7 +365,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x63 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x65 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6C ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x6B )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x6B ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x70 )
);
TO_CLIENT.registerPacket(
ClearTitles.class,
@@ -382,7 +392,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x61 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x63 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6A ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x69 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x69 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x6E )
);
TO_CLIENT.registerPacket(
TitleTimes.class,
@@ -397,7 +408,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x64 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x66 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x6D ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x6C )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x6C ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x71 )
);
TO_CLIENT.registerPacket(
SystemChat.class,
@@ -411,7 +423,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x69 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x6C ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x73 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x72 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x72 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x77 )
);
TO_CLIENT.registerPacket(
PlayerListHeaderFooter.class,
@@ -436,7 +449,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x6A ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x6D ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x74 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x73 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x73 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x78 )
);
TO_CLIENT.registerPacket(
EntityStatus.class,
@@ -456,7 +470,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_19_4, 0x1C ),
map( ProtocolConstants.MINECRAFT_1_20_2, 0x1D ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x1F ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x1E )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x1E ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x22 )
);
TO_CLIENT.registerPacket(
Commands.class,
@@ -487,7 +502,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x20 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x22 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x23 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x22 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x22 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x26 )
);
TO_CLIENT.registerPacket(
ViewDistance.class,
@@ -505,7 +521,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x53 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x55 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x59 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x58 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x58 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x5D )
);
TO_CLIENT.registerPacket(
ServerData.class,
@@ -518,7 +535,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x49 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x4B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x50 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x4F )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x4F ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x54 )
);
TO_CLIENT.registerPacket(
PlayerListItemRemove.class,
@@ -528,7 +546,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x3B ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x3D ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x3F ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x3E )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x3E ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x43 )
);
TO_CLIENT.registerPacket(
PlayerListItemUpdate.class,
@@ -538,7 +557,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_2, 0x3C ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x3E ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x40 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x3F )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x3F ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x44 )
);
TO_CLIENT.registerPacket(
StartConfiguration.class,
@@ -547,7 +567,8 @@ public enum Protocol
map( ProtocolConstants.MINECRAFT_1_20_3, 0x67 ),
map( ProtocolConstants.MINECRAFT_1_20_5, 0x69 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x70 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x6F )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x6F ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x74 )
);
TO_CLIENT.registerPacket(
CookieRequest.class,
@@ -561,40 +582,46 @@ public enum Protocol
RegisterType.ENCODE,
map( ProtocolConstants.MINECRAFT_1_20_5, 0x6B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x72 ),
map( ProtocolConstants.MINECRAFT_1_21_5, 0x71 )
map( ProtocolConstants.MINECRAFT_1_21_5, 0x71 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x76 )
);
TO_CLIENT.registerPacket(
Transfer.class,
Transfer::new,
RegisterType.ENCODE,
map( ProtocolConstants.MINECRAFT_1_20_5, 0x73 ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x7A )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x7A ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x7F )
);
TO_CLIENT.registerPacket(
DisconnectReportDetails.class,
DisconnectReportDetails::new,
RegisterType.ENCODE,
map( ProtocolConstants.MINECRAFT_1_21, 0x7A ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x81 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x81 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x86 )
);
TO_CLIENT.registerPacket(
ServerLinks.class,
ServerLinks::new,
RegisterType.ENCODE,
map( ProtocolConstants.MINECRAFT_1_21, 0x7B ),
map( ProtocolConstants.MINECRAFT_1_21_2, 0x82 )
map( ProtocolConstants.MINECRAFT_1_21_2, 0x82 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x87 )
);
TO_CLIENT.registerPacket(
ClearDialog.class,
ClearDialog::new,
RegisterType.ENCODE,
map( ProtocolConstants.MINECRAFT_1_21_6, 0x84 )
map( ProtocolConstants.MINECRAFT_1_21_6, 0x84 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x89 )
);
TO_CLIENT.registerPacket(
ShowDialog.class,
ShowDialog::new,
RegisterType.ENCODE,
map( ProtocolConstants.MINECRAFT_1_21_6, 0x85 )
map( ProtocolConstants.MINECRAFT_1_21_6, 0x85 ),
map( ProtocolConstants.MINECRAFT_1_21_9, 0x8A )
);
TO_SERVER.registerPacket(

View File

@@ -52,7 +52,7 @@ public class ProtocolConstants
public static final int MINECRAFT_1_21_5 = 770;
public static final int MINECRAFT_1_21_6 = 771;
public static final int MINECRAFT_1_21_7 = 772;
public static final int MINECRAFT_1_21_9 = 1073742089;
public static final int MINECRAFT_1_21_9 = 1073742092;
public static final List<String> SUPPORTED_VERSIONS;
public static final List<Integer> SUPPORTED_VERSION_IDS;