Update gophertunnel to v1.47.4 and change PlayerColour type to color.RGBA in legacy protocol.

This commit is contained in:
AkmalFairuz
2025-06-20 13:25:54 +07:00
parent 00f5d4d8c6
commit 752b98fb5c
3 changed files with 6 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package proto
import (
"github.com/google/uuid"
"github.com/sandertv/gophertunnel/minecraft/protocol"
"image/color"
)
// PlayerListEntry is an entry found in the PlayerList packet. It represents a single player using the UUID
@@ -38,7 +39,7 @@ type PlayerListEntry struct {
SubClient bool
// PlayerColour is the colour of the player that is shown in UI elements, currently only used for the
// player locator bar.
PlayerColour int32
PlayerColour color.RGBA
}
// Marshal encodes/decodes a PlayerListEntry.
@@ -54,7 +55,7 @@ func (x *PlayerListEntry) Marshal(r protocol.IO) {
r.Bool(&x.Host)
r.Bool(&x.SubClient)
if IsProtoGTE(r, ID800) {
r.Int32(&x.PlayerColour)
r.ARGB(&x.PlayerColour)
}
}