Update gophertunnel to v1.47.4 and change PlayerColour type to color.RGBA in legacy protocol.
This commit is contained in:
2
go.mod
2
go.mod
@@ -12,7 +12,7 @@ require (
|
|||||||
github.com/pelletier/go-toml v1.9.5
|
github.com/pelletier/go-toml v1.9.5
|
||||||
github.com/rogpeppe/go-internal v1.14.1
|
github.com/rogpeppe/go-internal v1.14.1
|
||||||
github.com/samber/lo v1.49.1
|
github.com/samber/lo v1.49.1
|
||||||
github.com/sandertv/gophertunnel v1.47.3
|
github.com/sandertv/gophertunnel v1.47.4
|
||||||
github.com/segmentio/fasthash v1.0.3
|
github.com/segmentio/fasthash v1.0.3
|
||||||
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
|
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
|
||||||
golang.org/x/image v0.25.0
|
golang.org/x/image v0.25.0
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -60,6 +60,8 @@ github.com/sandertv/gophertunnel v1.47.2-0.20250618150444-d66380c4a00b h1:/kNTXz
|
|||||||
github.com/sandertv/gophertunnel v1.47.2-0.20250618150444-d66380c4a00b/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
|
github.com/sandertv/gophertunnel v1.47.2-0.20250618150444-d66380c4a00b/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
|
||||||
github.com/sandertv/gophertunnel v1.47.3 h1:MsHv8QEx17+N/39BnAvHn/KU9zv8Rt9ZHTKaZK9vSuo=
|
github.com/sandertv/gophertunnel v1.47.3 h1:MsHv8QEx17+N/39BnAvHn/KU9zv8Rt9ZHTKaZK9vSuo=
|
||||||
github.com/sandertv/gophertunnel v1.47.3/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
|
github.com/sandertv/gophertunnel v1.47.3/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
|
||||||
|
github.com/sandertv/gophertunnel v1.47.4 h1:PmNbEUf9+7Fk8bP2875cvYTt22g0d4eeQhtd1dxjqqA=
|
||||||
|
github.com/sandertv/gophertunnel v1.47.4/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
|
||||||
github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=
|
github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=
|
||||||
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
|
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
|
||||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package proto
|
|||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/sandertv/gophertunnel/minecraft/protocol"
|
"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
|
// 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
|
SubClient bool
|
||||||
// PlayerColour is the colour of the player that is shown in UI elements, currently only used for the
|
// PlayerColour is the colour of the player that is shown in UI elements, currently only used for the
|
||||||
// player locator bar.
|
// player locator bar.
|
||||||
PlayerColour int32
|
PlayerColour color.RGBA
|
||||||
}
|
}
|
||||||
|
|
||||||
// Marshal encodes/decodes a PlayerListEntry.
|
// Marshal encodes/decodes a PlayerListEntry.
|
||||||
@@ -54,7 +55,7 @@ func (x *PlayerListEntry) Marshal(r protocol.IO) {
|
|||||||
r.Bool(&x.Host)
|
r.Bool(&x.Host)
|
||||||
r.Bool(&x.SubClient)
|
r.Bool(&x.SubClient)
|
||||||
if IsProtoGTE(r, ID800) {
|
if IsProtoGTE(r, ID800) {
|
||||||
r.Int32(&x.PlayerColour)
|
r.ARGB(&x.PlayerColour)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user