40class CraftingContainerManagerController :
public ::ContainerManagerController {
52 ::ll::TypedStorage<8, 8, ::BlockSource*> mUnsafeSourcePointer;
53 ::ll::TypedStorage<8, 8, ::BlockPos const&> mPos;
54 ::ll::TypedStorage<8, 64, ::std::function<void()>> mCallback;
59 BlockChangeListener& operator=(BlockChangeListener
const&);
60 BlockChangeListener(BlockChangeListener
const&);
61 BlockChangeListener();
66 virtual ~BlockChangeListener() =
default;
68 virtual void onBlockChanged(
76 ::BlockChangedEventTarget eventTarget,
87 MCNAPI
void $onBlockChanged(
95 ::BlockChangedEventTarget eventTarget,
109 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::CraftingContainerManagerModel>> mCraftingContainerManagerModel;
110 ::ll::TypedStorage<4, 4, int> mGridSize;
111 ::ll::TypedStorage<8, 8, ::Recipes*> mLevelRecipes;
112 ::ll::TypedStorage<8, 24, ::std::vector<::std::reference_wrapper<::Recipe const>>> mRecipes;
113 ::ll::TypedStorage<8, 8, ::Recipe const*> mCraftingRecipe;
114 ::ll::TypedStorage<8, 8, ::Recipe const*> mSelectedRecipe;
115 ::ll::TypedStorage<1, 1, bool> mDisplayingInvalidRecipe;
116 ::ll::TypedStorage<1, 1, bool> mClearInputGridOnChange;
117 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
118 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStateData>> mSavedInventoryState;
119 ::ll::TypedStorage<8, 48, ::CraftingSessionInfo> mCraftingInformation;
120 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mRemainingItems;
121 ::ll::TypedStorage<8, 128, ::ItemInstance> mResultPreviewItem;
122 ::ll::TypedStorage<8, 24, ::std::vector<::ItemInstance>> mAllResults;
123 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mListenerLifeIndicator;
124 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CraftingContainerManagerController::BlockChangeListener>>
125 mBlockChangeListener;
126 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::CraftableCountingData>> mCraftableCountCache;
127 ::ll::TypedStorage<1, 1, bool> mCraftableCountCacheDirty;
128 ::ll::TypedStorage<1, 1, bool> mCloseCraftingContainer;
129 ::ll::TypedStorage<1, 1, bool> mIsCrafting;
136 CraftingContainerManagerController();
142 virtual ~CraftingContainerManagerController() =
default;
144 virtual bool isOutputSlot(::std::string
const& collectionName)
const ;
146 virtual bool handleTakeAmount(
::SlotData const& dstSlot,
int amount,
::SlotData const& srcSlot) ;
156 virtual int handleAutoPlace(
159 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
160 ::std::vector<::AutoPlaceResult>& destinations
163 virtual int handleAutoPlaceStack(
166 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
167 ::std::vector<::AutoPlaceResult>& destinations
172 virtual void handleSplitMultiple(
183 virtual void closeContainers() ;
185 virtual ::ItemStackBase
const& getTakeableItemStackBase(
::SlotData const& slot)
const ;
192 MCNAPI
explicit CraftingContainerManagerController(
193 ::std::weak_ptr<::CraftingContainerManagerModel> containerManagerModel
196 MCNAPI
void _filterRecipes();
198 MCNAPI ::std::vector<::RecipeSearchResult> _getRecipesForItem(
200 ::std::vector<::std::string>
const& tags,
205 MCNAPI
void _handleItemCraftedEvents(
207 ::std::vector<short>
const& ingredientIds,
213 MCNAPI
void _handleTransferCraftExtraResults(::std::vector<::ItemInstance>& allResults);
215 MCNAPI
bool _inventoryContainsItemForRecipeInputSlot(::std::string
const& containerName,
int collectionIndex)
const;
217 MCNAPI ::CreateContainerItemScope _makeCreateItemScopeCrafting(
220 ::std::vector<::ItemInstance>& allResults
223 MCNAPI ::CreateContainerItemScope
226 MCNAPI
void _updateCraftingResultItem();
229 autoCraftItem(
::SlotData const& recipeSlot, ::ItemCraftType craftAmount, ::std::vector<::AutoPlaceItem>
const&);
231 MCNAPI
void clearAllRecipes();
233 MCNAPI
void evacuateCraftingContainerToInventory(
235 ::std::vector<::AutoPlaceItem>
const& autoPlace
238 MCNAPI
int getBackgroundStyle(::std::string
const& containerName,
int collectionIndex)
const;
240 MCNAPI ::CraftableCountingData getCraftableCount(
::ItemInstance const& item);
242 MCNAPI ::std::string
const& getExpandoItemGroupName(::std::string
const& collectionName,
int collectionIndex);
244 MCNAPI ::ItemInstance
const& getGhostItem(::std::string
const& collectionName,
int collectionIndex)
const;
246 MCNAPI
int getIndexForCreativeItem(::std::string
const& collectionName,
::ItemStackBase const& item)
const;
248 MCNAPI ::ItemInstance
const& getRecipeItem(::std::string
const& collectionName,
int collectionIndex)
const;
250 MCNAPI ::std::string
const& getSearchString()
const;
252 MCNAPI
void handleRecipeSelect(
253 ::std::string
const& collectionName,
256 ::std::vector<::AutoPlaceItem>
const& autoPlace
259 MCNAPI
bool isCreativeContainer(::std::string
const& containerName)
const;
261 MCNAPI
bool isExpandableItemFiltered(::std::string
const& collectionName,
int collectionIndex)
const;
263 MCNAPI
bool isTakeableContainer(::std::string
const& containerName)
const;
267 MCNAPI
void setOnItemExpandedCallback(::std::function<
void(::std::string
const&,
int,
int)> callback);
269 MCNAPI
void switchExpandoItem(::std::string
const& collectionName,
int collectionIndex);
277 MCNAPI
void* $ctor(::std::weak_ptr<::CraftingContainerManagerModel> containerManagerModel);
285 MCNAPI
bool $isOutputSlot(::std::string
const& collectionName)
const;
287 MCNAPI
bool $handleTakeAmount(
::SlotData const& dstSlot,
int amount,
::SlotData const& srcSlot);
297 MCNAPI
int $handleAutoPlace(
300 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
301 ::std::vector<::AutoPlaceResult>& destinations
304 MCNAPI
int $handleAutoPlaceStack(
307 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
308 ::std::vector<::AutoPlaceResult>& destinations
313 MCNAPI
void $handleSplitMultiple(
319 MCNAPI
bool $handleAddToStack(
::SlotData const& dstSlot,
::SlotData const& srcSlot, ::ItemTakeType type);
323 MCNAPI
void $closeContainers();
325 MCNAPI ::ItemStackBase
const& $getTakeableItemStackBase(
::SlotData const& slot)
const;