LeviLamina
Loading...
Searching...
No Matches
AnvilContainerManagerController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/safety/RedactableString.h"
7#include "mc/world/containers/SlotData.h"
8#include "mc/world/containers/managers/controllers/ContainerManagerController.h"
9#include "mc/world/containers/managers/controllers/ItemResultPreview.h"
10#include "mc/world/inventory/network/TypedServerNetId.h"
11#include "mc/world/inventory/simulation/ContainerScreenRequestActionType.h"
12
13// auto generated forward declare list
14// clang-format off
16class ItemInstance;
17class ItemStackBase;
18class Recipe;
19struct AutoPlaceItem;
20struct AutoPlaceResult;
25struct RecipeNetIdTag;
26struct SelectedSlotInfo;
27// clang-format on
28
29class AnvilContainerManagerController : public ::ContainerManagerController {
30public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::AnvilContainerManagerModel>> mAnvilContainerManagerModel;
34 ::ll::TypedStorage<4, 4, int> mCost;
35 ::ll::TypedStorage<8, 72, ::Bedrock::Safety::RedactableString> mPreviewName;
36 ::ll::TypedStorage<8, 72, ::Bedrock::Safety::RedactableString> mItemName;
37 ::ll::TypedStorage<1, 1, bool> mIsMapRecipe;
38 ::ll::TypedStorage<8, 136, ::ItemResultPreview> mResultPreview;
39 ::ll::TypedStorage<1, 1, bool> mIsEnchantingBookRecipe;
40 ::ll::TypedStorage<4, 4, int> mRepairItemCountCost;
41 ::ll::TypedStorage<4, 4, ::RecipeNetId> mCurrentRecipeNetId;
42 ::ll::TypedStorage<8, 8, ::Recipe const*> mMapCraftingRecipe;
43 ::ll::TypedStorage<8, 40, ::SlotData const> mCreatedItemOutputSlot;
44 // NOLINTEND
45
46#ifdef LL_PLAT_S
47#else // LL_PLAT_C
48public:
49 // prevent constructor by default
50 AnvilContainerManagerController();
51
52#endif
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual ~AnvilContainerManagerController() /*override*/ = default;
57
58 virtual void postInit(::std::weak_ptr<::ContainerManagerController> self) /*override*/;
59
60 virtual void updatePreviewItem() /*override*/;
61
62 virtual void setPreviewItemName(::Bedrock::Safety::RedactableString const& name) /*override*/;
63
64 virtual void setItemName(::Bedrock::Safety::RedactableString const& name) /*override*/;
65
66 virtual ::Bedrock::Safety::RedactableString const& getPreviewItemName() const /*override*/;
67
68 virtual ::Bedrock::Safety::RedactableString const& getItemName() const /*override*/;
69
70 virtual bool isOutputSlot(::std::string const& collectionName) const /*override*/;
71
72 virtual ::ItemStackBase const& getTakeableItemStackBase(::SlotData const& slot) const /*override*/;
73
74 virtual bool handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot) /*override*/;
75
76 virtual bool handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
77
78 virtual bool handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot) /*override*/;
79
80 virtual bool handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot) /*override*/;
81
82 virtual int handleAutoPlace(
83 ::SlotData const& srcSlot,
84 int amount,
85 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
86 ::std::vector<::AutoPlaceResult>& destinations
87 ) /*override*/;
88
89 virtual void _onItemAcquired(::ItemInstance const& stack, ::SlotData const& srcSlot) /*override*/;
90
91 virtual ::CreateContainerItemScope
92 _makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const&) /*override*/;
93
94 virtual void _updateItemStackRequest(
95 ::ContainerScreenRequestActionType,
97 ::ItemStackRequestScope& requestScope
98 ) /*override*/;
99 // NOLINTEND
100
101public:
102 // member functions
103 // NOLINTBEGIN
104#ifdef LL_PLAT_C
105 MCNAPI explicit AnvilContainerManagerController(
106 ::std::weak_ptr<::AnvilContainerManagerModel> containerManagerModel
107 );
108
109 MCNAPI bool _handleTransferCraft(::SlotData const& srcSlot, ::SlotData const& dstSlot);
110
111 MCNAPI bool _mayPickup();
112
113 MCNAPI bool areItemsIncompatible();
114
115 MCNAPI ::std::string getCostText();
116
117 MCNAPI bool shouldDrawGreen();
118
119 MCNAPI bool shouldDrawRed();
120#endif
121 // NOLINTEND
122
123public:
124 // constructor thunks
125 // NOLINTBEGIN
126#ifdef LL_PLAT_C
127 MCNAPI void* $ctor(::std::weak_ptr<::AnvilContainerManagerModel> containerManagerModel);
128#endif
129 // NOLINTEND
130
131public:
132 // virtual function thunks
133 // NOLINTBEGIN
134#ifdef LL_PLAT_C
135 MCNAPI void $postInit(::std::weak_ptr<::ContainerManagerController> self);
136
137 MCNAPI void $updatePreviewItem();
138
139 MCNAPI void $setPreviewItemName(::Bedrock::Safety::RedactableString const& name);
140
141 MCNAPI void $setItemName(::Bedrock::Safety::RedactableString const& name);
142
143 MCNAPI ::Bedrock::Safety::RedactableString const& $getPreviewItemName() const;
144
145 MCNAPI ::Bedrock::Safety::RedactableString const& $getItemName() const;
146
147 MCNAPI bool $isOutputSlot(::std::string const& collectionName) const;
148
149 MCNAPI ::ItemStackBase const& $getTakeableItemStackBase(::SlotData const& slot) const;
150
151 MCNAPI bool $handleTakeAmount(::SlotData const& dstSlot, int amount, ::SlotData const& srcSlot);
152
153 MCNAPI bool $handleTakeAll(::SlotData const& dstSlot, ::SlotData const& srcSlot);
154
155 MCNAPI bool $handleTakeHalf(::SlotData const& dstSlot, ::SlotData const& srcSlot);
156
157 MCNAPI bool $handlePlaceAll(::SelectedSlotInfo const& selected, ::SlotData const& dstSlot);
158
159 MCNAPI int $handleAutoPlace(
160 ::SlotData const& srcSlot,
161 int amount,
162 ::std::vector<::AutoPlaceItem> const& autoPlaceOrder,
163 ::std::vector<::AutoPlaceResult>& destinations
164 );
165
166 MCNAPI void $_onItemAcquired(::ItemInstance const& stack, ::SlotData const& srcSlot);
167
168 MCNAPI ::CreateContainerItemScope $_makeCreateItemScope(::SlotData const& srcSlot, ::ItemTransferAmount const&);
169
170 MCNAPI void $_updateItemStackRequest(
171 ::ContainerScreenRequestActionType,
172 ::ContainerScreenActionResult const& result,
173 ::ItemStackRequestScope& requestScope
174 );
175#endif
176
177
178 // NOLINTEND
179};
Definition AnvilContainerManagerModel.h:16
Definition RedactableString.h:10
Definition ItemInstance.h:15
Definition ItemStackBase.h:44
Definition Recipe.h:32
Definition AutoPlaceItem.h:5
Definition AutoPlaceResult.h:5
Definition ContainerScreenActionResult.h:11
Definition CreateContainerItemScope.h:18
Definition ItemStackRequestScope.h:11
Definition ItemTransferAmount.h:5
Definition RecipeNetIdTag.h:5
Definition SelectedSlotInfo.h:10
Definition SlotData.h:5