Update gophertunnel

This commit is contained in:
AkmalFairuz
2025-03-28 17:51:30 +07:00
parent 8a9d32f75e
commit aa1088d3da
4 changed files with 12 additions and 8 deletions

4
go.mod
View File

@@ -10,7 +10,7 @@ require (
github.com/pelletier/go-toml v1.9.5
github.com/rogpeppe/go-internal v1.13.1
github.com/samber/lo v1.49.1
github.com/sandertv/gophertunnel v1.45.1-0.20250325213530-4e2b368f13ca
github.com/sandertv/gophertunnel v1.45.1
github.com/segmentio/fasthash v1.0.3
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67
golang.org/x/image v0.21.0
@@ -29,6 +29,6 @@ require (
github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.37.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/text v0.23.0 // indirect
)

4
go.sum
View File

@@ -67,6 +67,8 @@ github.com/sandertv/gophertunnel v1.45.0 h1:bnOUbQWK8Hj26Q0rb5Ic+skjERV/G/Ao2lSQ
github.com/sandertv/gophertunnel v1.45.0/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/sandertv/gophertunnel v1.45.1-0.20250325213530-4e2b368f13ca h1:sFNeEFdO2U88+C8GRWchDb7ziTnTPRTv02dN5BHWopo=
github.com/sandertv/gophertunnel v1.45.1-0.20250325213530-4e2b368f13ca/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/sandertv/gophertunnel v1.45.1 h1:mQCEG1Rv1RR9UTRyTu0+XZ/cr3lyWvo/RX0DMHh8S6w=
github.com/sandertv/gophertunnel v1.45.1/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -108,6 +110,8 @@ golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs=
golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=

View File

@@ -14,8 +14,8 @@ const (
// CameraAimAssistPresets is sent by the server to the client to provide a list of categories and presets
// that can be used when sending a CameraAimAssist packet or a CameraInstruction including aim assist.
type CameraAimAssistPresets struct {
// CategoryGroups is a list of groups of categories which can be referenced by one of the Presets.
CategoryGroups []protocol.CameraAimAssistCategoryGroup
// Categories is a list of groups of categories which can be referenced by one of the Presets.
Categories []protocol.CameraAimAssistCategory
// Presets is a list of presets which define a base for how aim assist should behave
Presets []protocol.CameraAimAssistPreset
// Operation is the operation to perform with the presets. It is one of the constants above.
@@ -28,7 +28,7 @@ func (*CameraAimAssistPresets) ID() uint32 {
}
func (pk *CameraAimAssistPresets) Marshal(io protocol.IO) {
protocol.Slice(io, &pk.CategoryGroups)
protocol.Slice(io, &pk.Categories)
protocol.Slice(io, &pk.Presets)
if proto.IsProtoGTE(io, proto.ID776) {
io.Uint8(&pk.Operation)

View File

@@ -611,9 +611,9 @@ func (p *Protocol) downgradePackets(pks []packet.Packet, conn *minecraft.Conn) [
}
case *packet.CameraAimAssistPresets:
pks[pkIndex] = &legacypacket.CameraAimAssistPresets{
CategoryGroups: pk.CategoryGroups,
Presets: pk.Presets,
Operation: pk.Operation,
Categories: pk.Categories,
Presets: pk.Presets,
Operation: pk.Operation,
}
case *packet.CommandBlockUpdate:
pks[pkIndex] = &legacypacket.CommandBlockUpdate{