1#if PROTOCOL_VERSION > 347 && PROTOCOL_VERSION < 768
11 class RecipeDataCraftingShaped :
public RecipeData
14 using THIS = RecipeDataCraftingShaped;
15 std::vector<Ingredient> ReadIngredients(ReadIterator& iter,
size_t& length)
const
17 std::vector<Ingredient> ingredients(GetWidth() * GetHeight());
18 for (
size_t i = 0; i < ingredients.size(); ++i)
20 ingredients[i] = ReadData<Ingredient>(iter, length);
25 void WriteIngredients(
const std::vector<Ingredient>& ingredients, WriteContainer& container)
const
28 for (
int i = 0; i < ingredients.size(); ++i)
30 WriteData<Ingredient>(ingredients[i], container);
34#if PROTOCOL_VERSION < 765
39#if PROTOCOL_VERSION > 760
42#if PROTOCOL_VERSION > 764
46 SERIALIZED_FIELD(Ingredients, Internal::CustomType<std::vector<Ingredient>, &THIS::ReadIngredients, &THIS::WriteIngredients>);
48#if PROTOCOL_VERSION > 761
#define DECLARE_READ_WRITE_SERIALIZE
Define auto serializable utilities and declare ReadImpl, WriteImpl and SerializeImpl virtual function...
#define SERIALIZED_FIELD(Name,...)