#3801: Add support for 1.21.5-pre2
This commit is contained in:
		| @@ -49,7 +49,7 @@ public class ProtocolConstants | ||||
|     public static final int MINECRAFT_1_21 = 767; | ||||
|     public static final int MINECRAFT_1_21_2 = 768; | ||||
|     public static final int MINECRAFT_1_21_4 = 769; | ||||
|     public static final int MINECRAFT_1_21_5 = 1073742062; | ||||
|     public static final int MINECRAFT_1_21_5 = 1073742064; | ||||
|     public static final List<String> SUPPORTED_VERSIONS; | ||||
|     public static final List<Integer> SUPPORTED_VERSION_IDS; | ||||
|  | ||||
|   | ||||
| @@ -25,6 +25,7 @@ public class ClientChat extends DefinedPacket | ||||
|     private boolean signedPreview; | ||||
|     private ChatChain chain; | ||||
|     private SeenMessages seenMessages; | ||||
|     private byte checksum; | ||||
|  | ||||
|     @Override | ||||
|     public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) | ||||
| @@ -57,6 +58,11 @@ public class ClientChat extends DefinedPacket | ||||
|             chain = new ChatChain(); | ||||
|             chain.read( buf, direction, protocolVersion ); | ||||
|         } | ||||
|  | ||||
|         if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_21_5 ) | ||||
|         { | ||||
|             checksum = buf.readByte(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
| @@ -87,6 +93,11 @@ public class ClientChat extends DefinedPacket | ||||
|         { | ||||
|             chain.write( buf, direction, protocolVersion ); | ||||
|         } | ||||
|  | ||||
|         if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_21_5 ) | ||||
|         { | ||||
|             buf.writeByte( checksum ); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|   | ||||
| @@ -28,6 +28,7 @@ public class ClientCommand extends DefinedPacket | ||||
|     private boolean signedPreview; | ||||
|     private ChatChain chain; | ||||
|     private SeenMessages seenMessages; | ||||
|     private byte checksum; | ||||
|  | ||||
|     @Override | ||||
|     public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) | ||||
| @@ -68,6 +69,11 @@ public class ClientCommand extends DefinedPacket | ||||
|             chain = new ChatChain(); | ||||
|             chain.read( buf, direction, protocolVersion ); | ||||
|         } | ||||
|  | ||||
|         if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_21_5 ) | ||||
|         { | ||||
|             checksum = buf.readByte(); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
| @@ -101,6 +107,11 @@ public class ClientCommand extends DefinedPacket | ||||
|         { | ||||
|             chain.write( buf, direction, protocolVersion ); | ||||
|         } | ||||
|  | ||||
|         if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_21_5 ) | ||||
|         { | ||||
|             buf.writeByte( checksum ); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Outfluencer
					Outfluencer