diff --git a/mc/proto_generated/v1_12_2/proto.go b/mc/proto_generated/v1_12_2/proto.go index 91fab4f..46e3112 100644 --- a/mc/proto_generated/v1_12_2/proto.go +++ b/mc/proto_generated/v1_12_2/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.12.2/protocol.json (sha256:21c57208db654a5e14a34cb696570080df179c5c642e53b16120399eee9232be) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_12_2 import ( diff --git a/mc/proto_generated/v1_14_4/proto.go b/mc/proto_generated/v1_14_4/proto.go index 695076e..2730427 100644 --- a/mc/proto_generated/v1_14_4/proto.go +++ b/mc/proto_generated/v1_14_4/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.14.4/protocol.json (sha256:b6edff5abaaf234037b5019024d749e27e746250a23253bb4ad77d8f76e93167) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_14_4 import ( diff --git a/mc/proto_generated/v1_16_5/proto.go b/mc/proto_generated/v1_16_5/proto.go index 7442ea5..59e950b 100644 --- a/mc/proto_generated/v1_16_5/proto.go +++ b/mc/proto_generated/v1_16_5/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.16.2/protocol.json (sha256:d96a3c5a7a7ddf2105e23990c2471b3aeafe4a6975e0c9d7d7943b599af9dfb3) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_16_5 import ( diff --git a/mc/proto_generated/v1_21_11/proto.go b/mc/proto_generated/v1_21_11/proto.go index 8a4fa43..7b0f548 100644 --- a/mc/proto_generated/v1_21_11/proto.go +++ b/mc/proto_generated/v1_21_11/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.21.11/protocol.json (sha256:fec3d0a1516ec35ffea3950f95aef76e7818bf1ab47c1205310c00180944c340) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_21_11 import ( diff --git a/mc/proto_generated/v1_21_8/proto.go b/mc/proto_generated/v1_21_8/proto.go index 57fa286..0f60a4b 100644 --- a/mc/proto_generated/v1_21_8/proto.go +++ b/mc/proto_generated/v1_21_8/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.21.8/protocol.json (sha256:c7fd6d6aa06b260440e2e0e82995920e8cabfb0b71d5521f3d7b5ecb14ab054c) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_21_8 import ( diff --git a/mc/proto_generated/v1_21_9/proto.go b/mc/proto_generated/v1_21_9/proto.go index 75a65ad..d561628 100644 --- a/mc/proto_generated/v1_21_9/proto.go +++ b/mc/proto_generated/v1_21_9/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.21.9/protocol.json (sha256:de50c20cccb0093133fff3e243efe1fa9ffe2bfb9c67dd2f5c2a747c6935f9d6) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_21_9 import ( diff --git a/mc/proto_generated/v1_8/proto.go b/mc/proto_generated/v1_8/proto.go index be0a695..f28a82b 100644 --- a/mc/proto_generated/v1_8/proto.go +++ b/mc/proto_generated/v1_8/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/1.8/protocol.json (sha256:79fe774bfc255dd281899c004fbb9c7adc40fb107de9353da1dd0371ea4b53af) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v1_8 import ( diff --git a/mc/proto_generated/v26_1/proto.go b/mc/proto_generated/v26_1/proto.go index f7d59bd..f7c17d2 100644 --- a/mc/proto_generated/v26_1/proto.go +++ b/mc/proto_generated/v26_1/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. // source: minecraft-data/pc/26.1/protocol.json (sha256:093dbdd74f2cfbc8fc6be2e6f26c6b4d35470771cb34691306c68b066d785529) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v26_1 import ( diff --git a/mc/proto_generated/v26_2/proto.go b/mc/proto_generated/v26_2/proto.go index f165f37..47834a8 100644 --- a/mc/proto_generated/v26_2/proto.go +++ b/mc/proto_generated/v26_2/proto.go @@ -1,6 +1,6 @@ // Code generated by strom. DO NOT EDIT. -// source: minecraft-data/pc/26.2/protocol.json (sha256:e0d76c3d66b0995e69435d3ea0b2424e127cfcc610e230a511f51f899a1cb8f0) -// version: v0.6.6-0.20260805191907-f4c27628815b+dirty (go1.26.2) +// source: minecraft-data/pc/26.2/protocol.json (sha256:7d1157fb503d364c1673400a847e470e08d4036181700423939571ea83ee561d) +// version: v0.6.6-0.20260805202908-e58499ed0924+dirty (go1.26.2) package v26_2 import ( @@ -17717,50 +17717,52 @@ func (ret *PlayToClientPacketDeclareCommands) Encode(w io.Writer) (err error) { } type PlayToClientPacketDeclareRecipes struct { - Recipes []struct { - Name string + ItemSets []struct { + Key IDSet Items []int32 } StoneCutterRecipes []struct { - Input IDSet - SlotDisplay PlayToClientSlotDisplay + Input []int32 + OptionDisplay PlayToClientSlotDisplay + RecipePresent bool + Recipe any } } func (ret *PlayToClientPacketDeclareRecipes) Decode(r io.ReadSeeker) (err error) { - var lPlayToClientPacketDeclareRecipesRecipes int32 - lPlayToClientPacketDeclareRecipesRecipes, err = proto_base.DecodeVarInt(r) + var lPlayToClientPacketDeclareRecipesItemSets int32 + lPlayToClientPacketDeclareRecipesItemSets, err = proto_base.DecodeVarInt(r) if err != nil { return } - ret.Recipes = []struct { - Name string + ret.ItemSets = []struct { + Key IDSet Items []int32 }{} - for range lPlayToClientPacketDeclareRecipesRecipes { - var PlayToClientPacketDeclareRecipesRecipesElement struct { - Name string + for range lPlayToClientPacketDeclareRecipesItemSets { + var PlayToClientPacketDeclareRecipesItemSetsElement struct { + Key IDSet Items []int32 } - PlayToClientPacketDeclareRecipesRecipesElement.Name, err = proto_base.DecodeString(r) + err = PlayToClientPacketDeclareRecipesItemSetsElement.Key.Decode(r) if err != nil { return } - var lPlayToClientPacketDeclareRecipesRecipesElementItems int32 - lPlayToClientPacketDeclareRecipesRecipesElementItems, err = proto_base.DecodeVarInt(r) + var lPlayToClientPacketDeclareRecipesItemSetsElementItems int32 + lPlayToClientPacketDeclareRecipesItemSetsElementItems, err = proto_base.DecodeVarInt(r) if err != nil { return } - PlayToClientPacketDeclareRecipesRecipesElement.Items = []int32{} - for range lPlayToClientPacketDeclareRecipesRecipesElementItems { - var PlayToClientPacketDeclareRecipesRecipesElementItemsElement int32 - PlayToClientPacketDeclareRecipesRecipesElementItemsElement, err = proto_base.DecodeVarInt(r) + PlayToClientPacketDeclareRecipesItemSetsElement.Items = []int32{} + for range lPlayToClientPacketDeclareRecipesItemSetsElementItems { + var PlayToClientPacketDeclareRecipesItemSetsElementItemsElement int32 + PlayToClientPacketDeclareRecipesItemSetsElementItemsElement, err = proto_base.DecodeVarInt(r) if err != nil { return } - PlayToClientPacketDeclareRecipesRecipesElement.Items = append(PlayToClientPacketDeclareRecipesRecipesElement.Items, PlayToClientPacketDeclareRecipesRecipesElementItemsElement) + PlayToClientPacketDeclareRecipesItemSetsElement.Items = append(PlayToClientPacketDeclareRecipesItemSetsElement.Items, PlayToClientPacketDeclareRecipesItemSetsElementItemsElement) } - ret.Recipes = append(ret.Recipes, PlayToClientPacketDeclareRecipesRecipesElement) + ret.ItemSets = append(ret.ItemSets, PlayToClientPacketDeclareRecipesItemSetsElement) } var lPlayToClientPacketDeclareRecipesStoneCutterRecipes int32 lPlayToClientPacketDeclareRecipesStoneCutterRecipes, err = proto_base.DecodeVarInt(r) @@ -17768,42 +17770,76 @@ func (ret *PlayToClientPacketDeclareRecipes) Decode(r io.ReadSeeker) (err error) return } ret.StoneCutterRecipes = []struct { - Input IDSet - SlotDisplay PlayToClientSlotDisplay + Input []int32 + OptionDisplay PlayToClientSlotDisplay + RecipePresent bool + Recipe any }{} for range lPlayToClientPacketDeclareRecipesStoneCutterRecipes { var PlayToClientPacketDeclareRecipesStoneCutterRecipesElement struct { - Input IDSet - SlotDisplay PlayToClientSlotDisplay + Input []int32 + OptionDisplay PlayToClientSlotDisplay + RecipePresent bool + Recipe any } - err = PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.Input.Decode(r) + var lPlayToClientPacketDeclareRecipesStoneCutterRecipesElementInput int32 + lPlayToClientPacketDeclareRecipesStoneCutterRecipesElementInput, err = proto_base.DecodeVarInt(r) if err != nil { return } - err = PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.SlotDisplay.Decode(r) + PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.Input = []int32{} + for range lPlayToClientPacketDeclareRecipesStoneCutterRecipesElementInput { + var PlayToClientPacketDeclareRecipesStoneCutterRecipesElementInputElement int32 + PlayToClientPacketDeclareRecipesStoneCutterRecipesElementInputElement, err = proto_base.DecodeVarInt(r) + if err != nil { + return + } + PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.Input = append(PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.Input, PlayToClientPacketDeclareRecipesStoneCutterRecipesElementInputElement) + } + err = PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.OptionDisplay.Decode(r) if err != nil { return } + err = binary.Read(r, binary.BigEndian, &PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.RecipePresent) + if err != nil { + return + } + switch PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.RecipePresent { + case true: + var PlayToClientPacketDeclareRecipesStoneCutterRecipesElementRecipeTrueTmp struct { + Result Slot + } + err = PlayToClientPacketDeclareRecipesStoneCutterRecipesElementRecipeTrueTmp.Result.Decode(r) + if err != nil { + return + } + PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.Recipe = PlayToClientPacketDeclareRecipesStoneCutterRecipesElementRecipeTrueTmp + default: + var PlayToClientPacketDeclareRecipesStoneCutterRecipesElementRecipeTmp struct { + } + PlayToClientPacketDeclareRecipesStoneCutterRecipesElement.Recipe = PlayToClientPacketDeclareRecipesStoneCutterRecipesElementRecipeTmp + } ret.StoneCutterRecipes = append(ret.StoneCutterRecipes, PlayToClientPacketDeclareRecipesStoneCutterRecipesElement) } return } func (ret *PlayToClientPacketDeclareRecipes) Encode(w io.Writer) (err error) { - err = proto_base.EncodeVarInt(w, int32(len(ret.Recipes))) + err = proto_base.EncodeVarInt(w, int32(len(ret.ItemSets))) if err != nil { return } - for iPlayToClientPacketDeclareRecipesRecipes := range len(ret.Recipes) { - err = proto_base.EncodeString(w, ret.Recipes[iPlayToClientPacketDeclareRecipesRecipes].Name) + for iPlayToClientPacketDeclareRecipesItemSets := range len(ret.ItemSets) { + PlayToClientPacketDeclareRecipesItemSetsInnerKeyEncTmp := ret.ItemSets[iPlayToClientPacketDeclareRecipesItemSets].Key + err = PlayToClientPacketDeclareRecipesItemSetsInnerKeyEncTmp.Encode(w) if err != nil { return } - err = proto_base.EncodeVarInt(w, int32(len(ret.Recipes[iPlayToClientPacketDeclareRecipesRecipes].Items))) + err = proto_base.EncodeVarInt(w, int32(len(ret.ItemSets[iPlayToClientPacketDeclareRecipesItemSets].Items))) if err != nil { return } - for iPlayToClientPacketDeclareRecipesRecipesInnerItems := range len(ret.Recipes[iPlayToClientPacketDeclareRecipesRecipes].Items) { - err = proto_base.EncodeVarInt(w, ret.Recipes[iPlayToClientPacketDeclareRecipesRecipes].Items[iPlayToClientPacketDeclareRecipesRecipesInnerItems]) + for iPlayToClientPacketDeclareRecipesItemSetsInnerItems := range len(ret.ItemSets[iPlayToClientPacketDeclareRecipesItemSets].Items) { + err = proto_base.EncodeVarInt(w, ret.ItemSets[iPlayToClientPacketDeclareRecipesItemSets].Items[iPlayToClientPacketDeclareRecipesItemSetsInnerItems]) if err != nil { return } @@ -17814,16 +17850,47 @@ func (ret *PlayToClientPacketDeclareRecipes) Encode(w io.Writer) (err error) { return } for iPlayToClientPacketDeclareRecipesStoneCutterRecipes := range len(ret.StoneCutterRecipes) { - PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerInputEncTmp := ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].Input - err = PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerInputEncTmp.Encode(w) + err = proto_base.EncodeVarInt(w, int32(len(ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].Input))) if err != nil { return } - PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerSlotDisplayEncTmp := ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].SlotDisplay - err = PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerSlotDisplayEncTmp.Encode(w) + for iPlayToClientPacketDeclareRecipesStoneCutterRecipesInnerInput := range len(ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].Input) { + err = proto_base.EncodeVarInt(w, ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].Input[iPlayToClientPacketDeclareRecipesStoneCutterRecipesInnerInput]) + if err != nil { + return + } + } + PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerOptionDisplayEncTmp := ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].OptionDisplay + err = PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerOptionDisplayEncTmp.Encode(w) if err != nil { return } + err = binary.Write(w, binary.BigEndian, ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].RecipePresent) + if err != nil { + return + } + switch ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].RecipePresent { + case true: + PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerRecipe, ok := ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].Recipe.(struct { + Result Slot + }) + if !ok { + err = proto_base.BadTypeError + return + } + PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerRecipeResultEncTmp := PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerRecipe.Result + err = PlayToClientPacketDeclareRecipesStoneCutterRecipesInnerRecipeResultEncTmp.Encode(w) + if err != nil { + return + } + default: + _, ok := ret.StoneCutterRecipes[iPlayToClientPacketDeclareRecipesStoneCutterRecipes].Recipe.(struct { + }) + if !ok { + err = proto_base.BadTypeError + return + } + } } return }