Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
FurnaceContainerManagerController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/containers/ContainerEnumName.h"
7#include "mc/world/containers/SlotData.h"
8#include "mc/world/containers/managers/controllers/ContainerManagerController.h"
9#include "mc/world/item/ItemInstance.h"
10
11// auto generated forward declare list
12// clang-format off
15class HashedString;
16class ItemStack;
17class ItemStackBase;
18struct AutoPlaceItem;
19struct ItemStateData;
20struct SelectedSlotInfo;
21// clang-format on
22
23class FurnaceContainerManagerController : public ::ContainerManagerController {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::FurnaceContainerManagerModel>> mFurnaceContainerManagerModel;
28 ::ll::TypedStorage<1, 1, ::ContainerEnumName const> mIngredientName;
29 ::ll::TypedStorage<1, 1, bool> mClearInputGridOnChange;
30 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStateData>> mSavedInventoryState;
31 ::ll::TypedStorage<8, 40, ::SlotData const> mCreativeItemOutputSlot;
32 ::ll::TypedStorage<8, 32, ::std::string> mOutputName;
33 ::ll::TypedStorage<8, 128, ::ItemInstance> mSelectedRecipe;
34 // NOLINTEND
35
36#ifdef LL_PLAT_S
37#else // LL_PLAT_C
38public:
39 // prevent constructor by default
40 FurnaceContainerManagerController();
41
42#endif
43public:
44 // virtual functions
45 // NOLINTBEGIN
46#ifdef LL_PLAT_S
47 virtual ~FurnaceContainerManagerController() /*override*/ = default;
48#else // LL_PLAT_C
49 virtual ~FurnaceContainerManagerController() /*override*/;
50#endif
51
52 virtual bool handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot) /*override*/;
53
54 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
55
56 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const& slot) const /*override*/;
57
58#ifdef LL_PLAT_S
59 virtual void _onItemAcquired(::ItemInstance const&, ::SlotData const&) /*override*/;
60#else // LL_PLAT_C
61 virtual void _onItemAcquired(::ItemInstance const& itemInstance, ::SlotData const& srcSlot) /*override*/;
62#endif
63
64 // NOLINTEND
65
66public:
67 // member functions
68 // NOLINTBEGIN
69#ifdef LL_PLAT_C
70 MCNAPI FurnaceContainerManagerController(
71 ::std::weak_ptr<::FurnaceContainerManagerModel> containerManagerModel,
72 ::HashedString const& recipeTag
73 );
74
75 MCNAPI ::ItemInstance _getItemByIngredient(::ItemStack const& ingredient) const;
76
77 MCNAPI void clearAllRecipes();
78
79 MCNAPI void clearGhostRecipe(::ContainerEnumName container, int slot);
80
81 MCNAPI void
82 evacuateContainerToInventory(::ContainerController* container, ::std::vector<::AutoPlaceItem> const& autoPlace);
83
84 MCNAPI void evacuateResultToInventory(::std::vector<::AutoPlaceItem> const& autoPlace);
85
86 MCNAPI int getBackgroundStyle(::std::string const& containerName, int collectionIndex) const;
87
88 MCNAPI int getBurnProgress(int max);
89
90 MCNAPI ::std::string const& getExpandoItemGroupName(::std::string const& collectionName, int collectionIndex);
91
92 MCNAPI int getLitProgress(int max);
93
94 MCNAPI ::std::string const& getSearchString() const;
95
96 MCNAPI void handleRecipeSelect(
97 ::std::string const& collectionName,
98 int collectionIndex,
99 bool displayOnly,
100 ::std::vector<::AutoPlaceItem> const& autoPlace
101 );
102
103 MCNAPI void handleRecipeUnselect();
104
105 MCNAPI bool isCreativeContainer(::std::string const& containerName) const;
106
107 MCNAPI bool isExpandableItemFiltered(::std::string const& collectionName, int collectionIndex) const;
108
109 MCNAPI bool isRecipeContainer(::std::string const& containerName) const;
110
111 MCNAPI bool isRecipeIngredient(
112 ::std::string const& collectionName,
113 int collectionIndex,
114 ::ItemStackBase const& ingredient
115 ) const;
116
117 MCNAPI bool isTakeableContainer(::std::string const& containerName) const;
118
119 MCNAPI void registerOnIngredientOrResultChangedCallback(
120 ::std::function<void(int, ::ItemStack const&, ::ItemStack const&)> ingredientCallback,
121 ::std::function<void(int, ::ItemStack const&, ::ItemStack const&)> resultCallback
122 );
123
124 MCNAPI void setSelectedRecipe(::ItemInstance const& item);
125#endif
126 // NOLINTEND
127
128public:
129 // constructor thunks
130 // NOLINTBEGIN
131#ifdef LL_PLAT_C
132 MCNAPI void*
133 $ctor(::std::weak_ptr<::FurnaceContainerManagerModel> containerManagerModel, ::HashedString const& recipeTag);
134#endif
135 // NOLINTEND
136
137public:
138 // destructor thunk
139 // NOLINTBEGIN
140#ifdef LL_PLAT_C
141 MCNAPI void $dtor();
142#endif
143 // NOLINTEND
144
145public:
146 // virtual function thunks
147 // NOLINTBEGIN
148#ifdef LL_PLAT_C
149 MCNAPI bool $handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot);
150
151 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
152
153 MCNAPI ::ItemStackBase const& $getTakeableItemStackBase(::SlotData const& slot) const;
154
155 MCNAPI void $_onItemAcquired(::ItemInstance const& itemInstance, ::SlotData const& srcSlot);
156#endif
157
158
159 // NOLINTEND
160};
Definition ContainerController.h:20
Definition FurnaceContainerManagerModel.h:26
Definition HashedString.h:5
Definition ItemInstance.h:15
Definition ItemStackBase.h:45
Definition ItemStack.h:26
Definition AutoPlaceItem.h:5
Definition ItemStateData.h:5
Definition SelectedSlotInfo.h:10
Definition SlotData.h:5