LeviLamina
Loading...
Searching...
No Matches
FurnaceScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/ViewRequest.h"
8#include "mc/client/gui/screens/controllers/ContainerScreenController.h"
9#include "mc/client/gui/screens/controllers/FadeInIconBehavior.h"
10#include "mc/deps/core/string/HashedString.h"
11#include "mc/world/containers/ContainerEnumName.h"
12#include "mc/world/item/FurnaceItemCategory.h"
13
14// auto generated forward declare list
15// clang-format off
16class BlockPos;
19class ItemStackBase;
20class Player;
21class UIPropertyBag;
22struct ActorUniqueID;
23struct FurnaceOptions;
24struct SlotData;
25namespace Json { class Value; }
26// clang-format on
27
29public:
30 // FurnaceScreenController inner types declare
31 // clang-format off
32 struct CategoryTabInfo;
33 // clang-format on
34
35 // FurnaceScreenController inner types define
36 enum class CategoryTabState : int {
37 Visible = 0,
38 Hidden = 1,
39 };
40
41 struct CategoryTabInfo {
42 public:
43 // member variables
44 // NOLINTBEGIN
45 ::ll::TypedStorage<4, 4, ::FurnaceItemCategory> category;
46 ::ll::TypedStorage<1, 1, ::ContainerEnumName> containerEnum;
47 ::ll::TypedStorage<8, 32, ::std::string> tabName;
48 // NOLINTEND
49
50 public:
51 // member functions
52 // NOLINTBEGIN
53 MCAPI ~CategoryTabInfo();
54 // NOLINTEND
55
56 public:
57 // destructor thunk
58 // NOLINTBEGIN
59 MCFOLD void $dtor();
60 // NOLINTEND
61 };
62
63public:
64 // member variables
65 // NOLINTBEGIN
66 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::FurnaceContainerManagerController>>
67 mFurnaceContainerManagerController;
68 ::ll::TypedStorage<1, 1, ::ContainerEnumName> mHoveredContainer;
69 ::ll::TypedStorage<1, 1, ::ContainerEnumName const> mIngredientEnumName;
70 ::ll::TypedStorage<4, 4, int> mStartHeldFurnaceResultTime;
71 ::ll::TypedStorage<1, 1, bool> mPocket;
72 ::ll::TypedStorage<1, 1, bool> mEntered;
73 ::ll::TypedStorage<1, 1, bool> mRecipeLocked;
74 ::ll::TypedStorage<1, 1, bool> mUseRecipeUnlocking;
75 ::ll::TypedStorage<4, 4, int> mLayout;
76 ::ll::TypedStorage<4, 4, int> mSavedLayout;
77 ::ll::TypedStorage<1, 1, bool> mSmeltableFilterOn;
78 ::ll::TypedStorage<1, 1, bool> mSearchBarSelected;
79 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mDelayedSearchString;
80 ::ll::TypedStorage<1, 1, bool> mHasInitalCategoryTabsState;
81 ::ll::TypedStorage<4, 4, int> mTicksLeftUntilCategoryTabUpdate;
82 ::ll::TypedStorage<4, 4, int> mTabFiltersDirty;
83 ::ll::TypedStorage<8, 48, ::HashedString> mRecipeTag;
84 ::ll::TypedStorage<4, 4, int> mSelectedLeftTab;
85 ::ll::TypedStorage<8, 32, ::std::string> mSelectedCollectionName;
86 ::ll::TypedStorage<4, 4, int> mSelectedCollectionIndex;
87 // NOLINTEND
88
89public:
90 // prevent constructor by default
91 FurnaceScreenController();
92
93public:
94 // virtual functions
95 // NOLINTBEGIN
96 virtual ~FurnaceScreenController() /*override*/;
97
98 virtual ::ui::DirtyFlag tick() /*override*/;
99
100 virtual void onEntered() /*override*/;
101
102 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
103
104 virtual bool _isStillValid() const /*override*/;
105
106 virtual void _handlePlaceAll(::std::string const& collectionName, int index) /*override*/;
107
108 virtual void _handlePlaceOne(::std::string const& collectionName, int index) /*override*/;
109
110 virtual void _registerCoalesceOrder() /*override*/;
111
112 virtual void _registerAutoPlaceOrder() /*override*/;
113
114 virtual ::std::string _getCollectionName(::UIPropertyBag* bag) const /*override*/;
115
116 virtual ::SlotData _reevaluateSlotData(::SlotData&& slotData) const /*override*/;
117
118 virtual ::ItemStackBase const&
119 _getVisualItemStackImpl(::std::string const& collectionName, int collectionIndex) const /*override*/;
120
121 virtual bool _shouldSwap(
122 ::std::string const& collectionName,
123 int collectionIndex,
124 ::std::string const& otherCollectionName,
125 int otherCollectionIndex
126 ) const /*override*/;
127
128 virtual void _handleSelectSlot(::std::string const& collectionName, int collectionIndex) /*override*/;
129
130 virtual ::std::string _getButtonADescription() /*override*/;
131
132 virtual ::std::string _getButtonBDescription() /*override*/;
133
134 virtual ::std::string _getButtonXDescription() /*override*/;
135
136 virtual ::std::string _getButtonYDescription() /*override*/;
137
138 virtual ::ui::ViewRequest _onContainerSlotHovered(::std::string const& collectionName, int index) /*override*/;
139
140 virtual bool _isInCreativeContainer(::std::string const& containerName) const /*override*/;
141
142 virtual void _sendFlyingItem(
143 ::ItemStackBase const& item,
144 ::std::string const& fromName,
145 int fromIndex,
146 ::std::string const& toName,
147 int toIndex,
148 ::FadeInIconBehavior fadeInIconBehavior
149 ) /*override*/;
150 // NOLINTEND
151
152public:
153 // member functions
154 // NOLINTBEGIN
155 MCAPI FurnaceScreenController(
156 ::std::shared_ptr<::ClientInstanceScreenModel> model,
157 ::Player& player,
158 ::BlockPos const& pos,
159 ::ActorUniqueID uniqueId,
160 ::HashedString const& recipeTag
161 );
162
163 MCAPI int _findNextLeftSideTab(int dir) const;
164
165 MCAPI ::std::string _getExpandoItemGroupName(::std::string const& collectionName, int collectionIndex);
166
167 MCAPI ::FurnaceOptions const& _getFurnaceOptions() const;
168
169 MCAPI ::std::string _getRecipeHoverText(::std::string const& collectionName, int collectionIndex);
170
171 MCAPI void _handleClearGrid();
172
173 MCAPI void _handleRecipeBookSelectSlot(::std::string const& collectionName, int collectionIndex);
174
175 MCAPI bool _isBlocksTabVisible() const;
176
177 MCAPI bool _isFoodTabVisible() const;
178
179 MCAPI bool _isItemsTabVisible() const;
180
181 MCAPI bool _isRecipeIngredientSelected(::std::string const& collectionName, int collectionIndex) const;
182
183 MCAPI bool _isRecipeLocked(::std::string const& collectionName, int collectionIndex) const;
184
185 MCAPI void _loadPlayerOptions();
186
187 MCAPI void _refreshFilters(int tabIndex, bool forceRefresh);
188
189 MCAPI void _registerBindings();
190
191 MCAPI void _registerEventHandlers();
192
193 MCAPI void _registerStateMachine();
194
195 MCAPI void _savePlayerOptions();
196
197 MCAPI void _selectRecipe(::std::string const& collectionName, int collectionIndex);
198
199 MCAPI void _setIsFiltering(bool smeltableFilterOn);
200
201 MCAPI void _setLeftSideTab(int tabIndex);
202 // NOLINTEND
203
204public:
205 // static variables
206 // NOLINTBEGIN
207 MCAPI static ::std::string_view const& RECIPE_BOOK_COLLECTION_NAME();
208
209 MCAPI static ::std::unordered_map<int, ::FurnaceScreenController::CategoryTabInfo> const& mCategoryTabs();
210 // NOLINTEND
211
212public:
213 // constructor thunks
214 // NOLINTBEGIN
215 MCAPI void* $ctor(
216 ::std::shared_ptr<::ClientInstanceScreenModel> model,
217 ::Player& player,
218 ::BlockPos const& pos,
219 ::ActorUniqueID uniqueId,
220 ::HashedString const& recipeTag
221 );
222 // NOLINTEND
223
224public:
225 // destructor thunk
226 // NOLINTBEGIN
227 MCAPI void $dtor();
228 // NOLINTEND
229
230public:
231 // virtual function thunks
232 // NOLINTBEGIN
233 MCAPI ::ui::DirtyFlag $tick();
234
235 MCAPI void $onEntered();
236
237 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
238
239 MCFOLD bool $_isStillValid() const;
240
241 MCAPI void $_handlePlaceAll(::std::string const& collectionName, int index);
242
243 MCAPI void $_handlePlaceOne(::std::string const& collectionName, int index);
244
245 MCAPI void $_registerCoalesceOrder();
246
247 MCAPI void $_registerAutoPlaceOrder();
248
249 MCAPI ::std::string $_getCollectionName(::UIPropertyBag* bag) const;
250
251 MCAPI ::SlotData $_reevaluateSlotData(::SlotData&& slotData) const;
252
253 MCAPI ::ItemStackBase const&
254 $_getVisualItemStackImpl(::std::string const& collectionName, int collectionIndex) const;
255
256 MCAPI bool $_shouldSwap(
257 ::std::string const& collectionName,
258 int collectionIndex,
259 ::std::string const& otherCollectionName,
260 int otherCollectionIndex
261 ) const;
262
263 MCAPI void $_handleSelectSlot(::std::string const& collectionName, int collectionIndex);
264
265 MCAPI ::std::string $_getButtonADescription();
266
267 MCAPI ::std::string $_getButtonBDescription();
268
269 MCAPI ::std::string $_getButtonXDescription();
270
271 MCAPI ::std::string $_getButtonYDescription();
272
273 MCAPI ::ui::ViewRequest $_onContainerSlotHovered(::std::string const& collectionName, int index);
274
275 MCAPI bool $_isInCreativeContainer(::std::string const& containerName) const;
276
277 MCAPI void $_sendFlyingItem(
278 ::ItemStackBase const& item,
279 ::std::string const& fromName,
280 int fromIndex,
281 ::std::string const& toName,
282 int toIndex,
283 ::FadeInIconBehavior fadeInIconBehavior
284 );
285 // NOLINTEND
286
287public:
288 // vftables
289 // NOLINTBEGIN
291
292 MCNAPI static void** $vftableForScreenController();
293 // NOLINTEND
294};
Definition BlockPos.h:19
Definition ClientInstanceScreenModel.h:5
Definition ContainerScreenController.h:5
Definition FurnaceContainerManagerController.h:22
Definition FurnaceScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftableForScreenController()
Definition ItemStackBase.h:44
Definition Value.h:16
Definition Player.h:129
Definition UIPropertyBag.h:5
Definition ActorUniqueID.h:5
Definition FurnaceOptions.h:5
Definition FurnaceScreenController.h:15
Definition SlotData.h:5