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,
115 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::CraftingContainerManagerModel>> mCraftingContainerManagerModel;
116 ::ll::TypedStorage<4, 4, int> mGridSize;
117 ::ll::TypedStorage<8, 8, ::Recipes*> mLevelRecipes;
118 ::ll::TypedStorage<8, 24, ::std::vector<::std::reference_wrapper<::Recipe const>>> mRecipes;
119 ::ll::TypedStorage<8, 8, ::Recipe const*> mCraftingRecipe;
120 ::ll::TypedStorage<8, 8, ::Recipe const*> mSelectedRecipe;
121 ::ll::TypedStorage<1, 1, bool> mDisplayingInvalidRecipe;
122 ::ll::TypedStorage<1, 1, bool> mClearInputGridOnChange;
123 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
124 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStateData>> mSavedInventoryState;
125 ::ll::TypedStorage<8, 48, ::CraftingSessionInfo> mCraftingInformation;
126 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mRemainingItems;
127 ::ll::TypedStorage<8, 128, ::ItemInstance> mResultPreviewItem;
128 ::ll::TypedStorage<8, 24, ::std::vector<::ItemInstance>> mAllResults;
129 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mListenerLifeIndicator;
130 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CraftingContainerManagerController::BlockChangeListener>>
131 mBlockChangeListener;
132 ::ll::TypedStorage<1, 1, bool> mCloseCraftingContainer;
133 ::ll::TypedStorage<1, 1, bool> mIsCrafting;
145 virtual bool isOutputSlot(::std::string
const& collectionName)
const ;
147 virtual void handleTakeAmount(
::SlotData const& dstSlot,
int amount,
::SlotData const& srcSlot) ;
157 virtual int handleAutoPlace(
160 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
161 ::std::vector<::AutoPlaceResult>& destinations
164 virtual int handleAutoPlaceStack(
167 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
168 ::std::vector<::AutoPlaceResult>& destinations
173 virtual void handleSplitMultiple(
184 virtual void closeContainers() ;
186 virtual ::ItemStackBase
const& getTakeableItemStackBase(
::SlotData const& slot)
const ;
192 MCNAPI_C ::std::vector<::ItemInstance> _craftItem(
::ItemStackRequestScope const& requestScope, uchar craftCount);
194 MCNAPI_C
void _filterRecipes();
196 MCNAPI_C ::std::vector<::RecipeSearchResult>
197 _getRecipesForItem(
::ItemInstance const& recipeItem, ::std::vector<::std::string>
const& tags,
bool);
199 MCNAPI_C
void _handleItemCraftedEvents(
201 ::std::vector<short>
const& ingredientIds,
207 MCNAPI_C
void _handleTransferCraftExtraResults(::std::vector<::ItemInstance>& allResults);
210 _inventoryContainsItemForRecipeInputSlot(::std::string
const& containerName,
int collectionIndex)
const;
212 MCNAPI_C ::CreateContainerItemScope _makeCreateItemScopeCrafting(
215 ::std::vector<::ItemInstance>& allResults
218 MCNAPI_C ::CreateContainerItemScope
221 MCNAPI_C
void _setupCallbacks();
223 MCNAPI_C
void _updateCraftingResultItem();
226 autoCraftItem(
::SlotData const& recipeSlot, ::ItemCraftType craftAmount, ::std::vector<::AutoPlaceItem>
const&);
228 MCNAPI_C
void clearAllRecipes();
230 MCNAPI_C
void evacuateCraftingContainerToInventory(
232 ::std::vector<::AutoPlaceItem>
const& autoPlace
235 MCNAPI_C
int getBackgroundStyle(::std::string
const& containerName,
int collectionIndex)
const;
237 MCNAPI_C ::CraftableCountingData getCraftableCount(
::ItemInstance const& item);
239 MCNAPI_C ::std::string
const& getExpandoItemGroupName(::std::string
const& collectionName,
int collectionIndex);
241 MCNAPI_C ::ItemInstance
const& getGhostItem(::std::string
const& collectionName,
int collectionIndex);
243 MCNAPI_C
int getIndexForCreativeItem(::std::string
const& collectionName,
::ItemStackBase const& item)
const;
245 MCNAPI_C ::ItemInstance
const& getRecipeItem(::std::string
const& collectionName,
int collectionIndex)
const;
247 MCNAPI_C ::std::string
const& getSearchString()
const;
249 MCNAPI_C
void handleRecipeSelect(
250 ::std::string
const& collectionName,
253 ::std::vector<::AutoPlaceItem>
const& autoPlace
256 MCNAPI_C
bool isCreativeContainer(::std::string
const& containerName)
const;
258 MCNAPI_C
bool isExpandableItemFiltered(::std::string
const& collectionName,
int collectionIndex)
const;
260 MCNAPI_C
bool isTakeableContainer(::std::string
const& containerName)
const;
264 MCNAPI_C
void setOnItemExpandedCallback(::std::function<
void(::std::string
const&,
int,
int)> callback);
266 MCNAPI_C
void setSearchString(::std::string
const& searchString);
268 MCNAPI_C
void switchExpandoItem(::std::string
const& collectionName,
int collectionIndex);
274 MCNAPI_C
void* $ctor(::std::weak_ptr<::CraftingContainerManagerModel> containerManagerModel);
287 MCNAPI
bool $isOutputSlot(::std::string
const& collectionName)
const;
289 MCNAPI
void $handleTakeAmount(
::SlotData const& dstSlot,
int amount,
::SlotData const& srcSlot);
299 MCNAPI
int $handleAutoPlace(
302 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
303 ::std::vector<::AutoPlaceResult>& destinations
306 MCNAPI
int $handleAutoPlaceStack(
309 ::std::vector<::AutoPlaceItem>
const& autoPlaceOrder,
310 ::std::vector<::AutoPlaceResult>& destinations
315 MCNAPI
void $handleSplitMultiple(
321 MCNAPI
void $handleAddToStack(
::SlotData const& dstSlot,
::SlotData const& srcSlot, ::ItemTakeType type);
325 MCNAPI
void $closeContainers();
327 MCNAPI ::ItemStackBase
const& $getTakeableItemStackBase(
::SlotData const& slot)
const;