Skip to content

Commit

Permalink
Fix read available commands; Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbraemer committed Dec 13, 2022
1 parent 5391a80 commit c3677bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pkg/edition/java/proto/packet/available_commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion pkg/edition/java/proto/packet/brigadier/identifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 = &current.version
Expand Down
2 changes: 1 addition & 1 deletion pkg/edition/java/proto/packet/brigadier/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3677bf

Please sign in to comment.