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<1, 1, ::SharedTypes::CreativeItemCategory> category;
50 ::ll::TypedStorage<1, 1, ::ContainerEnumName> container;
51 ::ll::TypedStorage<8, 32, ::std::string> tabName;
59 ::ll::TypedStorage<8, 40, ::SlotData> mSlot;
60 ::ll::TypedStorage<4, 4, int> mNumExpandedItems;
67 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mDirty;
68 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::CraftingContainerManagerController>>
69 mCraftingContainerManagerController;
70 ::ll::TypedStorage<8, 40, ::std::optional<::std::string>> mDelayedSearchString;
71 ::ll::TypedStorage<1, 1, bool> mWorkbench;
72 ::ll::TypedStorage<1, 1, bool> mPocket;
73 ::ll::TypedStorage<1, 1, bool> mCraftableFilterOn;
74 ::ll::TypedStorage<4, 4, ::CraftingType> mCraftingType;
75 ::ll::TypedStorage<1, 1, bool> mEntered;
76 ::ll::TypedStorage<4, 4, int> mLayout;
77 ::ll::TypedStorage<4, 4, int> mSavedLayout;
78 ::ll::TypedStorage<4, 4, int> mCurrentlySelectedIndex;
79 ::ll::TypedStorage<8, 128, ::ItemInstance> mCurrentlySelectedItem;
80 ::ll::TypedStorage<1, 1, bool> mNeedReselectRecipeIndex;
81 ::ll::TypedStorage<1, 1, bool> mCanReselectRecipeIndex;
82 ::ll::TypedStorage<1, 1, bool> mIngredientSetChanged;
83 ::ll::TypedStorage<1, 1, bool> mNeedFirstTabSelection;
84 ::ll::TypedStorage<1, 1, bool> mNeedDefaultFocusSet;
85 ::ll::TypedStorage<1, 1, bool> mSearchBarSelected;
86 ::ll::TypedStorage<1, 1, bool> mCanCreativeHotbarSwap;
87 ::ll::TypedStorage<1, 1, bool> mRecipeLocked;
88 ::ll::TypedStorage<1, 1, bool> mUseRecipeUnlocking;
89 ::ll::TypedStorage<4, 4, int> mFocusRestorationContextSelectedTab;
90 ::ll::TypedStorage<8, 40, ::SlotData> mFocusRestorationContext;
91 ::ll::TypedStorage<8, 32, ::std::string> mRepeatCollectionName;
92 ::ll::TypedStorage<4, 4, int> mRepeatCollectionIndex;
93 ::ll::TypedStorage<4, 4, int> mRepeatCraftStartTime;
94 ::ll::TypedStorage<4, 4, int> mRepeatCraftLoopStartTime;
95 ::ll::TypedStorage<8, 48, ::CraftingScreenController::ScrollItemData> mNeedToScrollToItem;
96 ::ll::TypedStorage<8, 136, ::RepeatCraftButtonData> mRepeatCraftButton;
97 ::ll::TypedStorage<4, 4, int> mTabFiltersDirty;
98 ::ll::TypedStorage<4, 4, int> mSelectedLeftTab;
99 ::ll::TypedStorage<4, 4, int> mSelectedRightTab;
100 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::std::string>> mRecipeHoverTextCache;
101 ::ll::TypedStorage<1, 1, bool> mRecipeHoverTextCacheShowCategory;
106 CraftingScreenController();
111 virtual ~CraftingScreenController() =
default;
113 virtual void onOpen() ;
115 virtual void onEntered() ;
117 virtual void onTerminate() ;
119 virtual ::ui::DirtyFlag tick() ;
121 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
123 virtual void showToast(::ToastMessage message,
bool animateIn) ;
125 virtual void removeToast() ;
127 virtual void refreshToast() ;
129 virtual bool _isStillValid() const ;
131 virtual
void _handlePlaceAll(::std::
string const& collectionName,
int index) ;
133 virtual
void _handlePlaceOne(::std::
string const& collectionName,
int index) ;
135 virtual
void _handleSelectSlot(::std::
string const& collectionName,
int collectionIndex) ;
137 virtual ::ItemStackBase const&
138 _getVisualItemStackImpl(::std::
string const& collectionName,
int collectionIndex) const ;
140 virtual ::std::
string _getButtonADescription() ;
142 virtual ::std::
string _getButtonBDescription() ;
144 virtual ::std::
string _getButtonXDescription() ;
146 virtual ::std::
string _getButtonYDescription() ;
148 virtual ::ui::ViewRequest _onContainerSlotHovered(::std::
string const& collectionName,
int index) ;
150 virtual ::ui::ViewRequest _onContainerSlotPressed(::std::
string const& collectionName,
int index) ;
152 virtual
bool _onTouchScrollStartedWithSelectedSlot() ;
154 virtual ::std::
string _getCollectionName(::UIPropertyBag* bag) const ;
156 virtual ::SlotData _reevaluateSlotData(::SlotData&& slotData) const ;
158 virtual
bool _shouldSwap(
159 ::std::
string const& collectionName,
161 ::std::
string const& otherCollectionName,
162 int otherCollectionIndex
165 virtual
bool _isTargetSwappable(::std::
string const& otherCollectionName,
int otherCollectionIndex) const
168 virtual
void _sendFlyingItem(
169 ::ItemStackBase const& item,
170 ::std::
string const& fromName,
172 ::std::
string const& toName,
174 ::FadeInIconBehavior fadeInIconBehavior
177 virtual
void _registerCoalesceOrder() ;
179 virtual
void _registerAutoPlaceOrder() ;
181 virtual
bool _isInCreativeContainer(::std::
string const& containerName) const ;
187 MCNAPI CraftingScreenController(
192 ::CraftingType craftingType
199 MCAPI
void _evacuateCraftingGrid();
217 MCNAPI ::ui::ViewRequest
233 ::ContainerEnumName containerName,
241 MCNAPI static
void addStaticScreenVars(::Json::Value& globalVars,
bool pocket);
258 ::CraftingType craftingType
269 MCAPI
void $onTerminate();
271 MCAPI ::ui::DirtyFlag $tick();
285 MCAPI
void $_handlePlaceOne(::
std::
string const& collectionName,
int index);
290 $_getVisualItemStackImpl(::
std::
string const& collectionName,
int collectionIndex) const;
300 MCAPI ::ui::ViewRequest $_onContainerSlotHovered(::
std::
string const& collectionName,
int index);
311 ::
std::
string const& collectionName,
313 ::
std::
string const& otherCollectionName,
314 int otherCollectionIndex
321 ::
std::
string const& fromName,
323 ::
std::
string const& toName,
325 ::FadeInIconBehavior fadeInIconBehavior
Definition ClientInstanceScreenModel.h:5
Definition ContainerScreenController.h:5
Definition CraftingContainerManagerController.h:40
Definition CraftingScreenController.h:5
MCAPI void $_registerAutoPlaceOrder()
MCAPI bool _isNatureTabVisible() const
MCAPI bool _isEquipmentTabVisible() const
MCAPI::ui::ViewRequest $_onContainerSlotPressed(::std::string const &collectionName, int index)
MCAPI void _savePlayerInventoryOptions()
MCAPI void _handleRecipeSelect(::std::string const &collectionName, int collectionIndex, bool displayOnly)
MCAPI void _setLeftSideInventoryTab(int tabIndex, bool saveOptions)
MCAPI void _focusCollectionItem(::std::string const &collectionName, int collectionIndex, bool forceFocus)
MCAPI void * $ctor(::std::shared_ptr<::ClientInstanceScreenModel > model, ::Player &player, ::BlockPos const &pos, ::ActorUniqueID uniqueId, ::CraftingType craftingType)
MCAPI bool _currentItemIsSelected(::std::string const &collectionName, int collectionIndex) const
MCAPI::std::string $_getButtonBDescription()
MCAPI bool _isItemsTabVisible() const
MCAPI void _cycleLayout(int dir)
MCAPI void $_handleSelectSlot(::std::string const &collectionName, int collectionIndex)
MCAPI::std::string $_getButtonADescription()
MCAPI void _sendActiveLayoutInfo()
MCAPI::ui::ViewRequest _recipeAutoCraft(::std::string const &collectionName, int collectionIndex, ::ItemCraftType craftType)
MCAPI void $refreshToast()
MCAPI bool _isConstructionTabVisible() const
MCAPI int _tryAutoPlaceItemIntoContainer(::SlotData const &srcSlot, ::ItemTakeType type, ::ContainerEnumName containerName, ::std::vector<::AutoPlaceResult > &autoPlaceResults)
MCAPI void $_registerCoalesceOrder()
MCAPI::std::string $_getCollectionName(::UIPropertyBag *bag) const
MCAPI void _refreshFilters(::InventoryLeftTabIndex tab, bool forceRefresh)
MCAPI bool _isRecipeSlotCraftable(::SlotData const &slotData)
MCAPI::std::string $_getButtonYDescription()
MCAPI bool $_onTouchScrollStartedWithSelectedSlot()
MCAPI bool $_isInCreativeContainer(::std::string const &containerName) const
MCAPI bool $_shouldSwap(::std::string const &collectionName, int collectionIndex, ::std::string const &otherCollectionName, int otherCollectionIndex) const
MCAPI void $_sendFlyingItem(::ItemStackBase const &item, ::std::string const &fromName, int fromIndex, ::std::string const &toName, int toIndex, ::FadeInIconBehavior fadeInIconBehavior)
MCAPI::std::string _tabIndexToCollectionName(::InventoryLeftTabIndex index) const
MCAPI bool $_isStillValid() const
MCAPI void $addStaticScreenVars(::Json::Value &globalVars)
MCAPI void $removeToast()
MCAPI::std::string $_getButtonXDescription()
MCAPI void $_handlePlaceAll(::std::string const &collectionName, int index)
MCAPI bool $_isTargetSwappable(::std::string const &otherCollectionName, int otherCollectionIndex) const
MCAPI void $showToast(::ToastMessage message, bool animateIn)
static MCAPI ::std::vector<::CraftingScreenController::CategoryTabInfo > const & mCategoryTabs()
MCAPI::SlotData $_reevaluateSlotData(::SlotData &&slotData) const
MCAPI int _findNextLeftSideInventoryTab(int dir) const
Definition IToastListener.h:5
Definition ItemStackBase.h:45
Definition ToastMessage.h:5
Definition UIPropertyBag.h:5
Definition ActorUniqueID.h:5
Definition AutoPlaceResult.h:5
Definition CraftingScreenController.h:14