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 ItemStack;
20class ItemStackBase;
21class Player;
22class UIPropertyBag;
23struct ActorUniqueID;
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
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::FurnaceContainerManagerController>>
55 mFurnaceContainerManagerController;
56 ::ll::TypedStorage<1, 1, ::ContainerEnumName> mHoveredContainer;
57 ::ll::TypedStorage<1, 1, ::ContainerEnumName const> mIngredientEnumName;
58 ::ll::TypedStorage<4, 4, int> mStartHeldFurnaceResultTime;
59 ::ll::TypedStorage<1, 1, bool> mPocket;
60 ::ll::TypedStorage<1, 1, bool> mEntered;
61 ::ll::TypedStorage<1, 1, bool> mUseRecipeUnlocking;
62 ::ll::TypedStorage<4, 4, int> mLayout;
63 ::ll::TypedStorage<4, 4, int> mSavedLayout;
64 ::ll::TypedStorage<1, 1, bool> mSmeltableFilterOn;
65 ::ll::TypedStorage<1, 1, bool> mSearchBarSelected;
66 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mDelayedSearchString;
67 ::ll::TypedStorage<1, 1, bool> mHasInitalCategoryTabsState;
68 ::ll::TypedStorage<4, 4, int> mTTSPreviousIngredientId;
69 ::ll::TypedStorage<4, 4, int> mTicksLeftUntilCategoryTabUpdate;
70 ::ll::TypedStorage<4, 4, int> mTabFiltersDirty;
71 ::ll::TypedStorage<8, 48, ::HashedString> mRecipeTag;
72 ::ll::TypedStorage<4, 4, int> mSelectedLeftTab;
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
77 FurnaceScreenController();
78
79public:
80 // virtual functions
81 // NOLINTBEGIN
82 virtual ~FurnaceScreenController() /*override*/ = default;
83
84 virtual ::ui::DirtyFlag tick() /*override*/;
85
86 virtual void onOpen() /*override*/;
87
88 virtual void onEntered() /*override*/;
89
90 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
91
92 virtual bool _isStillValid() const /*override*/;
93
94 virtual void _handlePlaceAll(::std::string const& collectionName, int index) /*override*/;
95
96 virtual void _handlePlaceOne(::std::string const& collectionName, int index) /*override*/;
97
98 virtual void _registerCoalesceOrder() /*override*/;
99
100 virtual void _registerAutoPlaceOrder() /*override*/;
101
102 virtual ::std::string _getCollectionName(::UIPropertyBag* bag) const /*override*/;
103
104 virtual ::SlotData _reevaluateSlotData(::SlotData&& slotData) const /*override*/;
105
106 virtual ::ItemStackBase const&
107 _getVisualItemStackImpl(::std::string const& collectionName, int collectionIndex) const /*override*/;
108
109 virtual bool _shouldSwap(
110 ::std::string const& collectionName,
111 int collectionIndex,
112 ::std::string const& otherCollectionName,
113 int otherCollectionIndex
114 ) const /*override*/;
115
116 virtual void _handleSelectSlot(::std::string const& collectionName, int collectionIndex) /*override*/;
117
118 virtual ::std::string _getButtonADescription() /*override*/;
119
120 virtual ::std::string _getButtonBDescription() /*override*/;
121
122 virtual ::std::string _getButtonXDescription() /*override*/;
123
124 virtual ::std::string _getButtonYDescription() /*override*/;
125
126 virtual ::ui::ViewRequest _onContainerSlotHovered(::std::string const& collectionName, int index) /*override*/;
127
128 virtual bool _isInCreativeContainer(::std::string const& containerName) const /*override*/;
129
130 virtual void _sendFlyingItem(
131 ::ItemStackBase const& item,
132 ::std::string const& fromName,
133 int fromIndex,
134 ::std::string const& toName,
135 int toIndex,
136 ::FadeInIconBehavior fadeInIconBehavior
137 ) /*override*/;
138 // NOLINTEND
139
140public:
141 // member functions
142 // NOLINTBEGIN
143 MCAPI FurnaceScreenController(
144 ::std::shared_ptr<::ClientInstanceScreenModel> model,
145 ::Player& player,
146 ::BlockPos const& pos,
147 ::ActorUniqueID uniqueId,
148 ::HashedString const& recipeTag
149 );
150
151 MCAPI int _findNextLeftSideTab(int dir) const;
152
153 MCAPI void _handleClearGrid();
154
155 MCAPI bool _isRecipeIngredientSelected(::std::string const& collectionName, int collectionIndex) const;
156
157 MCAPI void _refreshFilters(int tabIndex, bool forceRefresh);
158
159 MCAPI void _savePlayerOptions();
160
161 MCAPI void _selectRecipe(::std::string const& collectionName, int collectionIndex);
162
163 MCAPI void _setLeftSideTab(int tabIndex);
164
165 MCAPI void _tryAddTTSMessageForFurnaceAction(::ItemStack const& ingredientItem, ::ItemStack const& resultItem);
166 // NOLINTEND
167
168public:
169 // static variables
170 // NOLINTBEGIN
171 MCAPI static ::std::unordered_map<int, ::FurnaceScreenController::CategoryTabInfo> const& mCategoryTabs();
172 // NOLINTEND
173
174public:
175 // constructor thunks
176 // NOLINTBEGIN
177 MCAPI void* $ctor(
178 ::std::shared_ptr<::ClientInstanceScreenModel> model,
179 ::Player& player,
180 ::BlockPos const& pos,
181 ::ActorUniqueID uniqueId,
182 ::HashedString const& recipeTag
183 );
184 // NOLINTEND
185
186public:
187 // virtual function thunks
188 // NOLINTBEGIN
189 MCAPI ::ui::DirtyFlag $tick();
190
191 MCAPI void $onOpen();
192
193 MCAPI void $onEntered();
194
195 MCAPI void $addStaticScreenVars(::Json::Value& globalVars);
196
197 MCFOLD bool $_isStillValid() const;
198
199 MCAPI void $_handlePlaceAll(::std::string const& collectionName, int index);
200
201 MCAPI void $_handlePlaceOne(::std::string const& collectionName, int index);
202
203 MCAPI void $_registerCoalesceOrder();
204
205 MCAPI void $_registerAutoPlaceOrder();
206
207 MCAPI ::std::string $_getCollectionName(::UIPropertyBag* bag) const;
208
209 MCAPI ::SlotData $_reevaluateSlotData(::SlotData&& slotData) const;
210
211 MCAPI ::ItemStackBase const&
212 $_getVisualItemStackImpl(::std::string const& collectionName, int collectionIndex) const;
213
214 MCAPI bool $_shouldSwap(
215 ::std::string const& collectionName,
216 int collectionIndex,
217 ::std::string const& otherCollectionName,
218 int otherCollectionIndex
219 ) const;
220
221 MCAPI void $_handleSelectSlot(::std::string const& collectionName, int collectionIndex);
222
223 MCAPI ::std::string $_getButtonADescription();
224
225 MCAPI ::std::string $_getButtonBDescription();
226
227 MCAPI ::std::string $_getButtonXDescription();
228
229 MCAPI ::std::string $_getButtonYDescription();
230
231 MCAPI ::ui::ViewRequest $_onContainerSlotHovered(::std::string const& collectionName, int index);
232
233 MCAPI bool $_isInCreativeContainer(::std::string const& containerName) const;
234
235 MCAPI void $_sendFlyingItem(
236 ::ItemStackBase const& item,
237 ::std::string const& fromName,
238 int fromIndex,
239 ::std::string const& toName,
240 int toIndex,
241 ::FadeInIconBehavior fadeInIconBehavior
242 );
243 // NOLINTEND
244};
Definition BlockPos.h:17
Definition ClientInstanceScreenModel.h:5
Definition ContainerScreenController.h:5
Definition FurnaceContainerManagerController.h:5
Definition FurnaceScreenController.h:5
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition Value.h:16
Definition Player.h:129
Definition UIPropertyBag.h:5
Definition ActorUniqueID.h:5
Definition FurnaceScreenController.h:15
Definition SlotData.h:5