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