feat: enhance Protocol18 and SocketWrapper for improved functionality

- Added support for the new world border hit flag in Protocol18 for protocol version 1.21.2.
- Updated SocketWrapper to throw a SocketException if SendDataRAW is called when not connected, improving error handling.

These changes enhance the protocol handling and error management in the Minecraft Console Client.
This commit is contained in:
BruceChen 2026-03-26 02:35:43 +08:00
parent 8456e363f5
commit dcfff3f1ba
2 changed files with 8 additions and 2 deletions

View file

@ -4587,7 +4587,10 @@ namespace MinecraftClient.Protocol.Handlers
if(protocolVersion >= MC_1_14_Version)
packet.Add(0); // insideBlock = false
if (protocolVersion >= MC_1_21_2_Version)
packet.Add(0); // worldBorderHit = false
if (protocolVersion >= MC_1_19_Version)
packet.AddRange(DataTypes.GetVarInt(sequenceId));