LeviLamina
Loading...
Searching...
No Matches
Recipe.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/deps/core/string/HashedString.h"
5#include "mc/platform/UUID.h"
6#include "mc/world/item/crafting/RecipeIngredient.h"
7#include "mc/world/item/crafting/RecipeUnlockingRequirement.h"
8
9// auto generated inclusion list
10#include "mc/world/inventory/network/TypedServerNetId.h"
11
12// auto generated forward declare list
13// clang-format off
14class CompoundTag;
16class CraftingContext;
17class HashedString;
18class ItemDescriptor;
19class ItemInstance;
20class ItemStack;
24class SemVersion;
25struct RecipeNetIdTag;
26namespace mce { class UUID; }
27// clang-format on
28
29class Recipe {
30public:
31 // Recipe inner types declare
32 // clang-format off
34 class Results;
35 // clang-format on
36
37 // Recipe inner types define
38 using Ingredients = ::std::vector<::RecipeIngredient>;
39
40 using ResultList = ::std::vector<::ItemInstance>;
41
42 using UnloadedItemInstanceResultList = ::std::vector<::NetworkItemInstanceDescriptor>;
43
44 class Results {
45 public:
46 // member variables
47 // NOLINTBEGIN
48 ::ll::TypedStorage<1, 1, bool> mResultsAreLoaded;
49 ::ll::TypedStorage<8, 24, ::std::vector<::ItemInstance>> mResults;
50 ::ll::TypedStorage<8, 24, ::std::vector<::NetworkItemInstanceDescriptor>> mUnloadedResults;
51 // NOLINTEND
52
53 public:
54 // member functions
55 // NOLINTBEGIN
56 MCAPI ~Results();
57 // NOLINTEND
58
59 public:
60 // destructor thunk
61 // NOLINTBEGIN
62 MCAPI void $dtor();
63 // NOLINTEND
64 };
65
67 public:
68 // member variables
69 // NOLINTBEGIN
70 ::ll::TypedStorage<8, 32, ::std::string> recipeId;
71 ::ll::TypedStorage<8, 24, ::std::vector<::RecipeIngredient>> ingredients;
72 ::ll::TypedStorage<8, 56, ::Recipe::Results> results;
73 ::ll::TypedStorage<8, 48, ::HashedString> tag;
74 ::ll::TypedStorage<4, 4, int> priority;
75 ::ll::TypedStorage<8, 8, ::mce::UUID const*> uuid;
76 ::ll::TypedStorage<8, 32, ::RecipeUnlockingRequirement> unlockingRequirement;
77 ::ll::TypedStorage<8, 24, ::SemVersion> formatVersion;
78 // NOLINTEND
79
80 public:
81 // member functions
82 // NOLINTBEGIN
84 // NOLINTEND
85
86 public:
87 // destructor thunk
88 // NOLINTBEGIN
89 MCAPI void $dtor();
90 // NOLINTEND
91 };
92
93public:
94 // member variables
95 // NOLINTBEGIN
96 ::ll::TypedStorage<8, 32, ::std::string> mRecipeId;
97 ::ll::TypedStorage<8, 16, ::mce::UUID> mMyId;
98 ::ll::TypedStorage<4, 4, int> mWidth;
99 ::ll::TypedStorage<4, 4, int> mHeight;
100 ::ll::TypedStorage<4, 4, int> mPriority;
101 ::ll::TypedStorage<4, 4, ::RecipeNetId> mRecipeNetId;
102 ::ll::TypedStorage<8, 24, ::std::vector<::RecipeIngredient>> mMyIngredients;
103 ::ll::TypedStorage<8, 56, ::Recipe::Results> mResults;
104 ::ll::TypedStorage<8, 32, ::RecipeUnlockingRequirement> mUnlockingRequirement;
105 ::ll::TypedStorage<8, 24, ::SemVersion> mRecipeDataVersion;
106 ::ll::TypedStorage<8, 48, ::HashedString> mTag;
107 // NOLINTEND
108
109public:
110 // virtual functions
111 // NOLINTBEGIN
112 // vIndex: 0
113 virtual ~Recipe();
114
115 // vIndex: 1
116 virtual ::std::vector<::ItemInstance> const& assemble(::CraftingContainer&, ::CraftingContext&) const = 0;
117
118 // vIndex: 2
119 virtual int getCraftingSize() const = 0;
120
121 // vIndex: 3
122 virtual ::RecipeIngredient const& getIngredient(int, int) const = 0;
123
124 // vIndex: 4
125 virtual bool isShapeless() const = 0;
126
127 // vIndex: 5
128 virtual bool matches(::CraftingContainer const&, ::CraftingContext const&) const = 0;
129
130 // vIndex: 6
131 virtual int size() const = 0;
132
133 // vIndex: 7
134 virtual ::mce::UUID const& getId() const;
135
136 // vIndex: 8
137 virtual ::std::vector<::ItemInstance> const& getResultItems() const;
138
139 // vIndex: 9
140 virtual bool isMultiRecipe() const;
141
142 // vIndex: 10
143 virtual bool hasDataDrivenResult() const;
144
145 // vIndex: 11
146 virtual bool itemValidForRecipe(::ItemDescriptor const& recipeItem, ::ItemStack const& item) const;
147
148 // vIndex: 13
149 virtual bool itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs) const;
150
151 // vIndex: 12
152 virtual bool
153 itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs, ::CompoundTag const* rhsTag) const;
154
155 // vIndex: 14
156 virtual uint64 getIngredientsHash() const;
157 // NOLINTEND
158
159public:
160 // member functions
161 // NOLINTBEGIN
163
164 MCAPI int countQuantityOfIngredient(::ItemInstance const& ingredient) const;
165
166 MCAPI void generateUUID();
167
168 MCAPI ::Recipe::ConstructionContext getConstructionContext() const;
169 // NOLINTEND
170
171public:
172 // static functions
173 // NOLINTBEGIN
174 MCAPI static bool isAnyAuxValue(::ItemDescriptor const& ii);
175 // NOLINTEND
176
177public:
178 // constructor thunks
179 // NOLINTBEGIN
180 MCAPI void* $ctor(::Recipe::ConstructionContext&& context);
181 // NOLINTEND
182
183public:
184 // destructor thunk
185 // NOLINTBEGIN
186 MCAPI void $dtor();
187 // NOLINTEND
188
189public:
190 // virtual function thunks
191 // NOLINTBEGIN
192 MCFOLD ::mce::UUID const& $getId() const;
193
194 MCFOLD ::std::vector<::ItemInstance> const& $getResultItems() const;
195
196 MCFOLD bool $isMultiRecipe() const;
197
198 MCFOLD bool $hasDataDrivenResult() const;
199
200 MCAPI bool $itemValidForRecipe(::ItemDescriptor const& recipeItem, ::ItemStack const& item) const;
201
202 MCAPI bool $itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs) const;
203
204 MCAPI bool $itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs, ::CompoundTag const* rhsTag) const;
205
206 MCAPI uint64 $getIngredientsHash() const;
207 // NOLINTEND
208
209public:
210 // vftables
211 // NOLINTBEGIN
212 MCAPI static void** $vftable();
213 // NOLINTEND
214};
Definition CompoundTag.h:13
Definition CraftingContainer.h:14
Definition CraftingContext.h:13
Definition HashedString.h:5
Definition ItemDescriptor.h:22
Definition ItemInstance.h:16
Definition ItemStack.h:25
Definition NetworkItemInstanceDescriptor.h:17
Definition RecipeIngredient.h:17
Definition RecipeUnlockingRequirement.h:10
Definition Recipe.h:44
Definition Recipe.h:29
Definition SemVersion.h:15
Definition RecipeNetIdTag.h:5
Definition Recipe.h:66
Definition context.h:5