mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
bugfix: Fixed teams packet crash
This commit is contained in:
commit
23262de6c2
1 changed files with 3 additions and 3 deletions
|
|
@ -3049,7 +3049,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
// nameTagVisibility, collisionRule, color (VarInt),
|
||||
// prefix (component), suffix (component)
|
||||
// method 0/3/4: players list (VarInt count + strings)
|
||||
// 1.21.9+ (protocol 773): nameTagVisibility and collisionRule are
|
||||
// 1.21.5+ (protocol 770): nameTagVisibility and collisionRule are
|
||||
// VarInt-encoded enum IDs instead of UTF strings.
|
||||
var teamName = dataTypes.ReadNextString(packetData);
|
||||
var teamMethod = dataTypes.ReadNextByte(packetData);
|
||||
|
|
@ -3068,7 +3068,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
teamFriendlyFlags = dataTypes.ReadNextByte(packetData);
|
||||
|
||||
// nameTagVisibility
|
||||
if (protocolVersion >= MC_1_21_9_Version)
|
||||
if (protocolVersion >= MC_1_21_5_Version)
|
||||
{
|
||||
// STREAM_CODEC: 0=always, 1=never, 2=hideForOtherTeams, 3=hideForOwnTeam
|
||||
teamNameTagVisibility = dataTypes.ReadNextVarInt(packetData) switch
|
||||
|
|
@ -3086,7 +3086,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
}
|
||||
|
||||
// collisionRule
|
||||
if (protocolVersion >= MC_1_21_9_Version)
|
||||
if (protocolVersion >= MC_1_21_5_Version)
|
||||
{
|
||||
// STREAM_CODEC: 0=always, 1=never, 2=pushOtherTeams, 3=pushOwnTeam
|
||||
teamCollisionRule = dataTypes.ReadNextVarInt(packetData) switch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue