3#include "mc/_HeaderOutputPredefine.h"
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"
25namespace Json {
class Value; }
36 enum class CategoryTabState :
int {
45 ::ll::TypedStorage<4, 4, ::FurnaceItemCategory> category;
46 ::ll::TypedStorage<1, 1, ::ContainerEnumName> containerEnum;
47 ::ll::TypedStorage<8, 32, ::std::string> tabName;
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;
77 FurnaceScreenController();
82 virtual ~FurnaceScreenController() =
default;
84 virtual ::ui::DirtyFlag tick() ;
86 virtual void onOpen() ;
88 virtual void onEntered() ;
90 virtual void addStaticScreenVars(::Json::Value& globalVars) ;
92 virtual bool _isStillValid() const ;
94 virtual
void _handlePlaceAll(::std::
string const& collectionName,
int index) ;
96 virtual
void _handlePlaceOne(::std::
string const& collectionName,
int index) ;
98 virtual
void _registerCoalesceOrder() ;
100 virtual
void _registerAutoPlaceOrder() ;
102 virtual ::std::
string _getCollectionName(::UIPropertyBag* bag) const ;
104 virtual ::SlotData _reevaluateSlotData(::SlotData&& slotData) const ;
106 virtual ::ItemStackBase const&
107 _getVisualItemStackImpl(::std::
string const& collectionName,
int collectionIndex) const ;
109 virtual
bool _shouldSwap(
110 ::std::
string const& collectionName,
112 ::std::
string const& otherCollectionName,
113 int otherCollectionIndex
116 virtual
void _handleSelectSlot(::std::
string const& collectionName,
int collectionIndex) ;
118 virtual ::std::
string _getButtonADescription() ;
120 virtual ::std::
string _getButtonBDescription() ;
122 virtual ::std::
string _getButtonXDescription() ;
124 virtual ::std::
string _getButtonYDescription() ;
126 virtual ::ui::ViewRequest _onContainerSlotHovered(::std::
string const& collectionName,
int index) ;
128 virtual
bool _isInCreativeContainer(::std::
string const& containerName) const ;
130 virtual
void _sendFlyingItem(
131 ::ItemStackBase const& item,
132 ::std::
string const& fromName,
134 ::std::
string const& toName,
136 ::FadeInIconBehavior fadeInIconBehavior
143 MCAPI FurnaceScreenController(
144 ::std::shared_ptr<::ClientInstanceScreenModel> model,
146 ::BlockPos const& pos,
147 ::ActorUniqueID uniqueId,
148 ::HashedString const& recipeTag
151 MCAPI
int _findNextLeftSideTab(
int dir) const;
153 MCAPI
void _handleClearGrid();
155 MCAPI
bool _isRecipeIngredientSelected(::std::
string const& collectionName,
int collectionIndex) const;
157 MCAPI
void _refreshFilters(
int tabIndex,
bool forceRefresh);
159 MCAPI
void _savePlayerOptions();
161 MCAPI
void _selectRecipe(::std::
string const& collectionName,
int collectionIndex);
163 MCAPI
void _setLeftSideTab(
int tabIndex);
165 MCAPI
void _tryAddTTSMessageForFurnaceAction(::ItemStack const& ingredientItem, ::ItemStack const& resultItem);
171 MCAPI static ::std::unordered_map<
int, ::FurnaceScreenController::
CategoryTabInfo> const& mCategoryTabs();
178 ::std::shared_ptr<::ClientInstanceScreenModel> model,
180 ::BlockPos const& pos,
181 ::ActorUniqueID uniqueId,
182 ::HashedString const& recipeTag
189 MCAPI ::ui::DirtyFlag $tick();
191 MCAPI
void $onOpen();
193 MCAPI
void $onEntered();
195 MCAPI
void $addStaticScreenVars(::Json::Value& globalVars);
197 MCFOLD
bool $_isStillValid() const;
199 MCAPI
void $_handlePlaceAll(::std::
string const& collectionName,
int index);
201 MCAPI
void $_handlePlaceOne(::std::
string const& collectionName,
int index);
203 MCAPI
void $_registerCoalesceOrder();
205 MCAPI
void $_registerAutoPlaceOrder();
207 MCAPI ::std::
string $_getCollectionName(::UIPropertyBag* bag) const;
209 MCAPI ::SlotData $_reevaluateSlotData(::SlotData&& slotData) const;
211 MCAPI ::ItemStackBase const&
212 $_getVisualItemStackImpl(::std::
string const& collectionName,
int collectionIndex) const;
214 MCAPI
bool $_shouldSwap(
215 ::std::
string const& collectionName,
217 ::std::
string const& otherCollectionName,
218 int otherCollectionIndex
221 MCAPI
void $_handleSelectSlot(::std::
string const& collectionName,
int collectionIndex);
223 MCAPI ::std::
string $_getButtonADescription();
225 MCAPI ::std::
string $_getButtonBDescription();
227 MCAPI ::std::
string $_getButtonXDescription();
229 MCAPI ::std::
string $_getButtonYDescription();
231 MCAPI ::ui::ViewRequest $_onContainerSlotHovered(::std::
string const& collectionName,
int index);
233 MCAPI
bool $_isInCreativeContainer(::std::
string const& containerName) const;
235 MCAPI
void $_sendFlyingItem(
236 ::ItemStackBase const& item,
237 ::std::
string const& fromName,
239 ::std::
string const& toName,
241 ::FadeInIconBehavior fadeInIconBehavior
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 UIPropertyBag.h:5
Definition ActorUniqueID.h:5
Definition FurnaceScreenController.h:15