51 ::ll::TypedStorage<4, 4, int> mWidth;
52 ::ll::TypedStorage<4, 4, int> mHeight;
53 ::ll::TypedStorage<8, 32, ::std::string> mNormalizedResult;
54 ::ll::TypedStorage<8, 32, ::std::string> mWarning;
62 ::ll::TypedStorage<8, 8, ::Item*> mItem;
63 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
64 ::ll::TypedStorage<8, 24, ::RecipeIngredient> mIngredient;
65 ::ll::TypedStorage<1, 1, char> mC;
73 ::ll::TypedStorage<8, 24, ::std::vector<::HashedString>> mTags;
74 ::ll::TypedStorage<8, 24, ::std::vector<::Recipes::Type>> mInputList;
75 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mOutputInstances;
76 ::ll::TypedStorage<8, 24, ::std::vector<::ItemInstance>> mResultList;
77 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mShapeList;
81 using TypeList = ::std::vector<::Recipes::Type>;
86 ::ll::TypedStorage<8, 8, ::ResourcePackManager*> mResourcePackManager;
87 ::ll::TypedStorage<8, 8, ::ExternalRecipeStore> mExternalRecipeStore;
88 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::std::map<::std::string, ::std::shared_ptr<::Recipe>>>>
90 ::ll::TypedStorage<1, 1, bool> mInitializing;
96 ::ll::TypedStorage<8, 64, ::std::unordered_map<::RecipeNetId, ::Recipe*>> mRecipesByNetId;
100 ::std::unordered_map<uint64, ::std::unordered_map<uint64, ::std::shared_ptr<::std::vector<::ItemInstance>>>>>
102 ::ll::TypedStorage<8, 24, ::std::vector<::gsl::not_null<::Recipe*>>> mUnlockableRecipes;
103 ::ll::TypedStorage<8, 64, ::std::unordered_set<::std::string>> mUniqueUnlockableRecipeIds;
104 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::std::unordered_map<int, ::ItemInstance>>> mFurnaceResults;
105 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::std::weak_ptr<bool>, ::std::function<void()>>>> mListeners;
106 ::ll::TypedStorage<8, 8, ::ILevel*> mLevel;
116 MCAPI
explicit Recipes(
::ILevel* level);
119 MCAPI
void _addItemRecipe(::std::unique_ptr<::Recipe> recipe);
123 MCAPI
void _addItemRecipe(::std::unique_ptr<::Recipe> recipe);
128 MCAPI ::RecipeIngredient
const _loadIngredientFromJson(
130 ::MolangVersion molangVersion,
135 MCAPI ::RecipeIngredient
const
138 MCAPI
bool _loadRecipe(
139 ::std::string
const& recipeId,
148 MCAPI ::std::optional<::RecipeUnlockingRequirement> _loadUnlockingRequirementFromJson(
150 ::MolangVersion molangVersion,
151 ::std::string
const& recipeId
154 MCAPI
void addDyedItemRecipe(
155 ::std::string recipeId,
165 MCAPI
void addNetMappedRecipe(::RecipeNetId
const& recipeNetId, ::std::unique_ptr<::Recipe> recipe);
167 MCAPI
void addRecipeListener(::std::weak_ptr<bool> lifePtr, ::std::function<
void()> callback);
170 MCAPI
void addShapedRecipe(
171 ::std::string recipeId,
173 ::std::string
const& r0,
174 ::std::vector<::Recipes::Type>
const& types,
175 ::std::vector<::HashedString>
const& tags,
177 ::std::function<::std::unique_ptr<::ShapedRecipe>(
181 ::std::vector<::RecipeIngredient>
const&,
182 ::std::vector<::ItemInstance>
const&,
192 bool const assumeSymmetry
195 MCAPI
void addShapedRecipe(
196 ::std::string recipeId,
197 ::std::vector<::ItemInstance>
const& result,
198 ::std::vector<::std::string>
const& rows,
199 ::std::vector<::Recipes::Type>
const& types,
200 ::std::vector<::HashedString>
const& tags,
202 ::std::function<::std::unique_ptr<::ShapedRecipe>(
206 ::std::vector<::RecipeIngredient>
const&,
207 ::std::vector<::ItemInstance>
const&,
217 bool const assumeSymmetry
220 MCAPI
void addShapedRecipe(
221 ::std::string recipeId,
223 ::std::vector<::std::string>
const& rows,
224 ::std::vector<::Recipes::Type>
const& types,
225 ::std::vector<::HashedString>
const& tags,
227 ::std::function<::std::unique_ptr<::ShapedRecipe>(
231 ::std::vector<::RecipeIngredient>
const&,
232 ::std::vector<::ItemInstance>
const&,
242 bool const assumeSymmetry
245 MCAPI
void addShapedRecipe(
246 ::std::string recipeId,
248 ::std::string
const& r0,
249 ::std::string
const& r1,
250 ::std::vector<::Recipes::Type>
const& types,
251 ::std::vector<::HashedString>
const& tags,
253 ::std::function<::std::unique_ptr<::ShapedRecipe>(
257 ::std::vector<::RecipeIngredient>
const&,
258 ::std::vector<::ItemInstance>
const&,
271 MCAPI
void addShapedRecipe(
272 ::std::string recipeId,
274 ::std::string
const& r0,
275 ::std::string
const& r1,
276 ::std::string
const& r2,
277 ::std::vector<::Recipes::Type>
const& types,
278 ::std::vector<::HashedString>
const& tags,
280 ::std::function<::std::unique_ptr<::ShapedRecipe>(
284 ::std::vector<::RecipeIngredient>
const&,
285 ::std::vector<::ItemInstance>
const&,
298 MCAPI
void addShapelessRecipe(
299 ::std::string recipeId,
301 ::std::vector<::Recipes::Type>
const& types,
302 ::std::vector<::HashedString>
const& tags,
304 ::std::function<::std::unique_ptr<::ShapelessRecipe>(
306 ::std::vector<::RecipeIngredient>
const&,
307 ::std::vector<::ItemInstance>
const&,
318 MCAPI
void addShulkerBoxRecipe(
319 ::std::string& recipeId,
321 ::std::vector<::Recipes::Type>
const& types,
322 ::std::vector<::HashedString>
const& tags,
327 MCAPI
void clearRecipes();
332 MCAPI
void forEachRecipeFor(
333 ::std::vector<::std::string>
const& tags,
337 MCAPI
void forEachRecipeFor(
343 MCAPI
void forEachRecipeFor(
345 ::std::vector<::std::string>
const& tags,
352 MCAPI
void forEachRecipeUntil(
354 ::std::vector<::std::string>
const& tags,
358 MCAPI ::std::vector<::ItemInstance>
364 MCAPI ::Recipe
const* getRecipeByNetId(::RecipeNetId
const& netId)
const;
376 MCAPI
void notifyRecipeListeners();
378 MCAPI
void removeRecipeListener(::std::weak_ptr<bool> lifePtr);