diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc044838..ca998a43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,7 +105,7 @@ jobs: go-version-file: go.mod - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v4 with: version: latest args: release --rm-dist diff --git a/pkg/edition/java/proto/packet/available_commands.go b/pkg/edition/java/proto/packet/available_commands.go index 3ae48877..fb196021 100644 --- a/pkg/edition/java/proto/packet/available_commands.go +++ b/pkg/edition/java/proto/packet/available_commands.go @@ -233,6 +233,7 @@ func (w *WireNode) decode(rd io.Reader, protocol proto.Protocol) (err error) { return err } } + switch t := w.Flags & FlagNodeType; t { case NodeTypeRoot: case NodeTypeLiteral: diff --git a/pkg/edition/java/proto/packet/brigadier/identifier.go b/pkg/edition/java/proto/packet/brigadier/identifier.go index e80363e4..bb0d2fde 100644 --- a/pkg/edition/java/proto/packet/brigadier/identifier.go +++ b/pkg/edition/java/proto/packet/brigadier/identifier.go @@ -36,7 +36,9 @@ func newArgIdentifier(id string, versions ...versionSet) (*ArgumentIdentifier, e } for _, v := range version.Versions { if v.Protocol >= current.version { - identifier.idByProtocol[v.Protocol] = current.id + if _, ok := identifier.idByProtocol[v.Protocol]; !ok { + identifier.idByProtocol[v.Protocol] = current.id + } } } previous = ¤t.version diff --git a/pkg/edition/java/proto/packet/brigadier/registry.go b/pkg/edition/java/proto/packet/brigadier/registry.go index c5b0766b..96ce21bc 100644 --- a/pkg/edition/java/proto/packet/brigadier/registry.go +++ b/pkg/edition/java/proto/packet/brigadier/registry.go @@ -216,7 +216,7 @@ func init() { ResourceOrTagKeyArgument, ResourceOrTagKeyArgumentPropertyCodec) register(id("minecraft:resource", mapSet(version.Minecraft_1_19_3, 43), mapSet(version.Minecraft_1_19, 44)), RegistryKeyArgument, RegistryKeyArgumentPropertyCodec) - register(id("minecraft:resource_key", mapSet(version.Minecraft_1_19_3, 43)), + register(id("minecraft:resource_key", mapSet(version.Minecraft_1_19_3, 44)), ResourceKeyArgument, ResourceKeyArgumentPropertyCodec) empty(id("minecraft:template_mirror", mapSet(version.Minecraft_1_19, 45))) // 1.19