|
|
|
@@ -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
|
|
|
|
|
}
|
|
|
|
|