3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/CraftingType.h"
7#include "mc/client/gui/DirtyFlag.h"
8#include "mc/client/gui/ViewRequest.h"
9#include "mc/client/gui/screens/controllers/ContainerScreenController.h"
10#include "mc/client/gui/screens/controllers/FadeInIconBehavior.h"
11#include "mc/client/gui/screens/controllers/RepeatCraftButtonData.h"
12#include "mc/client/social/IToastListener.h"
13#include "mc/deps/shared_types/item/CreativeItemCategory.h"
14#include "mc/world/containers/ContainerEnumName.h"
15#include "mc/world/containers/SlotData.h"
16#include "mc/world/containers/controllers/ItemCraftType.h"
17#include "mc/world/containers/controllers/ItemTakeType.h"
18#include "mc/world/inventory/InventoryLeftTabIndex.h"
19#include "mc/world/item/ItemInstance.h"
32namespace Json {
class Value; }
48 ::ll::TypedStorage<4, 4, ::InventoryLeftTabIndex> tabIndex;
49 ::ll::TypedStorage<4, 4, ::SharedTypes::CreativeItemCategory> category;
50 ::ll::TypedStorage<1, 1, ::ContainerEnumName> container;
51 ::ll::TypedStorage<8, 32, ::std::string> tabName;
57 MCAPI ~CategoryTabInfo();
71 ::ll::TypedStorage<8, 40, ::SlotData> mSlot;
72 ::ll::TypedStorage<4, 4, int> mNumExpandedItems;
78 MCAPI ~ScrollItemData();
91 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mDirty;
92 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::CraftingContainerManagerController>>
93 mCraftingContainerManagerController;
94 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mDelayedSearchString;
95 ::ll::TypedStorage<1, 1, bool> mWorkbench;
96 ::ll::TypedStorage<1, 1, bool> mPocket;
97 ::ll::TypedStorage<1, 1, bool> mCraftableFilterOn;
98 ::ll::TypedStorage<4, 4, ::CraftingType> mCraftingType;
99 ::ll::TypedStorage<1, 1, bool> mEntered;
100 ::ll::TypedStorage<4, 4, int> mLayout;
101 ::ll::TypedStorage<4, 4, int> mSavedLayout;
102 ::ll::TypedStorage<4, 4, int> mCurrentlySelectedIndex;
103 ::ll::TypedStorage<8, 128, ::ItemInstance> mCurrentlySelectedItem;
104 ::ll::TypedStorage<1, 1, bool> mNeedReselectRecipeIndex;
105 ::ll::TypedStorage<1, 1, bool> mCanReselectRecipeIndex;
106 ::ll::TypedStorage<1, 1, bool> mIngredientSetChanged;
107 ::ll::TypedStorage<1, 1, bool> mNeedFirstTabSelection;
108 ::ll::TypedStorage<1, 1, bool> mNeedDefaultFocusSet;
109 ::ll::TypedStorage<1, 1, bool> mSearchBarSelected;
110 ::ll::TypedStorage<1, 1, bool> mCanCreativeHotbarSwap;
111 ::ll::TypedStorage<1, 1, bool> mRecipeLocked;
112 ::ll::TypedStorage<1, 1, bool> mUseRecipeUnlocking;
113 ::ll::TypedStorage<4, 4, int> mFocusRestorationContextSelectedTab;
114 ::ll::TypedStorage<8, 40, ::SlotData> mFocusRestorationContext;
115 ::ll::TypedStorage<8, 32, ::std::string> mRepeatCollectionName;
116 ::ll::TypedStorage<4, 4, int> mRepeatCollectionIndex;
117 ::ll::TypedStorage<4, 4, int> mRepeatCraftStartTime;
118 ::ll::TypedStorage<4, 4, int> mRepeatCraftLoopStartTime;
119 ::ll::TypedStorage<8, 48, ::CraftingScreenController::ScrollItemData> mNeedToScrollToItem;
120 ::ll::TypedStorage<8, 136, ::RepeatCraftButtonData> mRepeatCraftButton;
121 ::ll::TypedStorage<4, 4, int> mTabFiltersDirty;
122 ::ll::TypedStorage<4, 4, int> mSelectedLeftTab;
123 ::ll::TypedStorage<4, 4, int> mSelectedRightTab;
128 CraftingScreenController();
133 virtual ~CraftingScreenController() ;
135 virtual void onOpen() ;
137 virtual void onEntered() ;
139 virtual void onTerminate() ;
141 virtual ::ui::DirtyFlag tick() ;
143 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
145 virtual void showToast(::ToastMessage message,
bool animateIn) ;
147 virtual void removeToast() ;
149 virtual void refreshToast() ;
151 virtual bool _isStillValid() const ;
153 virtual
void _handlePlaceAll(::std::
string const& collectionName,
int index) ;
155 virtual
void _handlePlaceOne(::std::
string const& collectionName,
int index) ;
157 virtual
void _handleSelectSlot(::std::
string const& collectionName,
int collectionIndex) ;
159 virtual ::ItemStackBase const&
160 _getVisualItemStackImpl(::std::
string const& collectionName,
int collectionIndex) const ;
162 virtual ::std::
string _getButtonADescription() ;
164 virtual ::std::
string _getButtonBDescription() ;
166 virtual ::std::
string _getButtonXDescription() ;
168 virtual ::std::
string _getButtonYDescription() ;
170 virtual ::ui::ViewRequest _onContainerSlotHovered(::std::
string const& collectionName,
int index) ;
172 virtual ::ui::ViewRequest _onContainerSlotPressed(::std::
string const& collectionName,
int index) ;
174 virtual ::std::
string _getCollectionName(::UIPropertyBag* bag) const ;
176 virtual ::SlotData _reevaluateSlotData(::SlotData&& slotData) const ;
178 virtual
bool _shouldSwap(
179 ::std::
string const& collectionName,
181 ::std::
string const& otherCollectionName,
182 int otherCollectionIndex
185 virtual
bool _isTargetSwappable(::std::
string const& otherCollectionName,
int otherCollectionIndex) const
188 virtual
void _sendFlyingItem(
189 ::ItemStackBase const& item,
190 ::std::
string const& fromName,
192 ::std::
string const& toName,
194 ::FadeInIconBehavior fadeInIconBehavior
197 virtual
void _registerCoalesceOrder() ;
199 virtual
void _registerAutoPlaceOrder() ;
201 virtual
bool _isInCreativeContainer(::std::
string const& containerName) const ;
207 MCAPI CraftingScreenController(
208 ::std::shared_ptr<::ClientInstanceScreenModel> model,
210 ::BlockPos const& pos,
211 ::ActorUniqueID uniqueId,
212 ::CraftingType craftingType
215 MCAPI
bool _currentItemIsSelected(::std::
string const& collectionName,
int collectionIndex) const;
217 MCAPI
void _cycleLayout(
int dir);
219 MCAPI
void _evacuateCraftingGrid();
221 MCAPI
int _findNextLeftSideInventoryTab(
int dir) const;
223 MCAPI
void _focusCollectionItem(::std::
string const& collectionName,
int collectionIndex,
bool forceFocus);
225 MCAPI ::std::
string _getButtonLeftStickDescription() const;
227 MCAPI ::std::
string _getCraftStackText() const;
229 MCAPI ::std::
string _getExpandoItemGroupName(::std::
string const& collectionName,
int collectionIndex);
231 MCAPI ::std::
string _getRecipeHoverText(::std::
string const& collectionName,
int collectionIndex);
233 MCAPI
void _handleAutoDestroy(::std::
string const& collectionName,
int collectionIndex);
235 MCAPI
void _handleCraftItem(::ItemCraftType);
237 MCAPI
void _handleCreativeHotbarPlaceAll(::std::
string const& collectionName,
int collectionIndex);
239 MCAPI
void _handleCreativeHotbarPlaceOne(::std::
string const& collectionName,
int collectionIndex);
241 MCAPI
void _handleRecipeSelect(::std::
string const& collectionName,
int collectionIndex,
bool displayOnly);
243 MCAPI
bool _isConstructionTabVisible() const;
245 MCAPI
bool _isEquipmentTabVisible() const;
247 MCAPI
bool _isItemsTabVisible() const;
249 MCAPI
bool _isNatureTabVisible() const;
251 MCAPI
void _loadPlayerInventoryOptions();
253 MCAPI ::ui::ViewRequest
254 _recipeAutoCraft(::std::
string const& collectionName,
int collectionIndex, ::ItemCraftType craftType);
256 MCAPI
void _refreshFilters(::InventoryLeftTabIndex tab,
bool forceRefresh);
258 MCAPI
void _registerBindings();
260 MCAPI
void _registerEventHandlers();
262 MCAPI
void _registerStateMachine();
264 MCAPI
void _savePlayerInventoryOptions();
266 MCAPI
void _sendActiveLayoutInfo();
268 MCAPI
void _setInitialTabsSelected(
int defaultLeftTab,
int defaultRightTab);
270 MCAPI
void _setLeftSideInventoryTab(
int tabIndex,
bool saveOptions);
272 MCAPI ::std::
string _tabIndexToCollectionName(::InventoryLeftTabIndex index) const;
274 MCAPI
int _tryAutoPlaceItemIntoContainer(
275 ::SlotData const& srcSlot,
277 ::ContainerEnumName containerName,
278 ::std::vector<::AutoPlaceResult>& autoPlaceResults
281 MCAPI
void _tryHoverOnIngredientSetChanged();
283 MCAPI
void _updateInteractionCollectionName();
289 MCAPI static
void addStaticScreenVars(::Json::Value& globalVars,
bool pocket);
295 MCAPI static ::std::vector<::CraftingScreenController::
CategoryTabInfo> const& mCategoryTabs();
302 ::std::shared_ptr<::ClientInstanceScreenModel> model,
304 ::BlockPos const& pos,
305 ::ActorUniqueID uniqueId,
306 ::CraftingType craftingType
319 MCAPI
void $onOpen();
321 MCAPI
void $onEntered();
323 MCAPI
void $onTerminate();
325 MCAPI ::ui::DirtyFlag $tick();
327 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
329 MCAPI
void $showToast(::ToastMessage message,
bool animateIn);
331 MCAPI
void $removeToast();
333 MCAPI
void $refreshToast();
335 MCAPI
bool $_isStillValid() const;
337 MCAPI
void $_handlePlaceAll(::std::
string const& collectionName,
int index);
339 MCAPI
void $_handlePlaceOne(::std::
string const& collectionName,
int index);
341 MCAPI
void $_handleSelectSlot(::std::
string const& collectionName,
int collectionIndex);
343 MCAPI ::ItemStackBase const&
344 $_getVisualItemStackImpl(::std::
string const& collectionName,
int collectionIndex) const;
346 MCAPI ::std::
string $_getButtonADescription();
348 MCAPI ::std::
string $_getButtonBDescription();
350 MCAPI ::std::
string $_getButtonXDescription();
352 MCAPI ::std::
string $_getButtonYDescription();
354 MCAPI ::ui::ViewRequest $_onContainerSlotHovered(::std::
string const& collectionName,
int index);
356 MCAPI ::ui::ViewRequest $_onContainerSlotPressed(::std::
string const& collectionName,
int index);
358 MCAPI ::std::
string $_getCollectionName(::UIPropertyBag* bag) const;
360 MCAPI ::SlotData $_reevaluateSlotData(::SlotData&& slotData) const;
362 MCAPI
bool $_shouldSwap(
363 ::std::
string const& collectionName,
365 ::std::
string const& otherCollectionName,
366 int otherCollectionIndex
369 MCAPI
bool $_isTargetSwappable(::std::
string const& otherCollectionName,
int otherCollectionIndex) const;
371 MCAPI
void $_sendFlyingItem(
372 ::ItemStackBase const& item,
373 ::std::
string const& fromName,
375 ::std::
string const& toName,
377 ::FadeInIconBehavior fadeInIconBehavior
380 MCAPI
void $_registerCoalesceOrder();
382 MCAPI
void $_registerAutoPlaceOrder();
384 MCAPI
bool $_isInCreativeContainer(::std::
string const& containerName) const;
Definition ClientInstanceScreenModel.h:5
Definition ContainerScreenController.h:5
Definition CraftingContainerManagerController.h:40
Definition CraftingScreenController.h:5
static MCAPI void ** $vftableForScreenController()
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftable()
Definition IToastListener.h:5
Definition ItemStackBase.h:52
Definition ToastMessage.h:5
Definition UIPropertyBag.h:5
Definition ActorUniqueID.h:10
Definition AutoPlaceResult.h:5
Definition CraftingScreenController.h:14