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/deps/core/sem_ver/SemVersion.h"
11#include "mc/deps/core/string/HashedString.h"
12#include "mc/platform/UUID.h"
13#include "mc/world/inventory/network/TypedServerNetId.h"
14#include "mc/world/item/crafting/RecipeUnlockingRequirement.h"
15
16// auto generated forward declare list
17// clang-format off
18class CompoundTag;
20class CraftingContext;
21class ItemDescriptor;
22class ItemInstance;
23class ItemStack;
26struct RecipeNetIdTag;
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 // prevent constructor by default
111 Recipe();
112
113public:
114 // virtual functions
115 // NOLINTBEGIN
116 // vIndex: 0
117 virtual ~Recipe();
118
119 // vIndex: 1
120 virtual ::std::vector<::ItemInstance> const& assemble(::CraftingContainer&, ::CraftingContext&) const = 0;
121
122 // vIndex: 2
123 virtual int getCraftingSize() const = 0;
124
125 // vIndex: 3
126 virtual ::RecipeIngredient const& getIngredient(int, int) const = 0;
127
128 // vIndex: 4
129 virtual bool isShapeless() const = 0;
130
131 // vIndex: 5
132 virtual bool matches(::CraftingContainer const&, ::CraftingContext const&) const = 0;
133
134 // vIndex: 6
135 virtual int size() const = 0;
136
137 // vIndex: 7
138 virtual ::mce::UUID const& getId() const;
139
140 // vIndex: 8
141 virtual ::std::vector<::ItemInstance> const& getResultItems() const;
142
143 // vIndex: 9
144 virtual bool isMultiRecipe() const;
145
146 // vIndex: 10
147 virtual bool hasDataDrivenResult() const;
148
149 // vIndex: 11
150 virtual bool itemValidForRecipe(::ItemDescriptor const& recipeItem, ::ItemStack const& item) const;
151
152 // vIndex: 13
153 virtual bool itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs) const;
154
155 // vIndex: 12
156 virtual bool
157 itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs, ::CompoundTag const* rhsTag) const;
158
159 // vIndex: 14
160 virtual uint64 getIngredientsHash() const;
161 // NOLINTEND
162
163public:
164 // member functions
165 // NOLINTBEGIN
167
168 MCAPI int countQuantityOfIngredient(::ItemInstance const& ingredient) const;
169
170 MCAPI void generateUUID();
171
172 MCAPI ::Recipe::ConstructionContext getConstructionContext() const;
173 // NOLINTEND
174
175public:
176 // static functions
177 // NOLINTBEGIN
178 MCAPI static bool isAnyAuxValue(::ItemDescriptor const& ii);
179 // NOLINTEND
180
181public:
182 // constructor thunks
183 // NOLINTBEGIN
184 MCAPI void* $ctor(::Recipe::ConstructionContext&& context);
185 // NOLINTEND
186
187public:
188 // destructor thunk
189 // NOLINTBEGIN
190 MCAPI void $dtor();
191 // NOLINTEND
192
193public:
194 // virtual function thunks
195 // NOLINTBEGIN
196 MCFOLD ::mce::UUID const& $getId() const;
197
198 MCFOLD ::std::vector<::ItemInstance> const& $getResultItems() const;
199
200 MCFOLD bool $isMultiRecipe() const;
201
202 MCFOLD bool $hasDataDrivenResult() const;
203
204 MCAPI bool $itemValidForRecipe(::ItemDescriptor const& recipeItem, ::ItemStack const& item) const;
205
206 MCAPI bool $itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs) const;
207
208 MCAPI bool $itemsMatch(::ItemDescriptor const& lhs, ::ItemDescriptor const& rhs, ::CompoundTag const* rhsTag) const;
209
210 MCAPI uint64 $getIngredientsHash() const;
211 // NOLINTEND
212
213public:
214 // vftables
215 // NOLINTBEGIN
216 MCNAPI static void** $vftable();
217 // NOLINTEND
218};
Definition CompoundTag.h:13
Definition CraftingContainer.h:14
Definition CraftingContext.h:13
Definition ItemDescriptor.h:22
Definition ItemInstance.h:16
Definition ItemStack.h:25
Definition NetworkItemInstanceDescriptor.h:17
Definition RecipeIngredient.h:17
Definition Recipe.h:44
Definition Recipe.h:29
static MCAPI void ** $vftable()
Definition RecipeNetIdTag.h:5
Definition Recipe.h:66
Definition context.h:5