37 using DynamicContainerPublisher =
43 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::PlayerContainerRefresher>>> mContainerRefresher;
44 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::DynamicContainerTracker>>> mDynamicContainerTracker;
45 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryAccess>> mRegistryAccess;
46 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
47 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mLastSlots;
48 ::ll::TypedStorage<1, 1, ::ContainerID> mContainerId;
49 ::ll::TypedStorage<1, 1, ::SharedTypes::Legacy::ContainerType> mContainerType;
54 void(::SharedTypes::Legacy::ContainerType),
57 mContainerTypeSubscribers;
62 mInformControllerOfDestructionCallbacks;
63 ::ll::TypedStorage<8, 40, ::ContainerScreenContext> mScreenContext;
64 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::shared_ptr<::ContainerModel>>> mContainers;
66 mOnDynamicContainerChangePublisher;
71 ContainerManagerModel& operator=(ContainerManagerModel
const&);
72 ContainerManagerModel(ContainerManagerModel
const&);
73 ContainerManagerModel();
78 virtual ~ContainerManagerModel() ;
82 virtual ::ContainerID getContainerId()
const ;
84 virtual void setContainerId(::ContainerID
id) ;
86 virtual ::SharedTypes::Legacy::ContainerType getContainerType()
const ;
88 virtual void setContainerType(::SharedTypes::Legacy::ContainerType type) ;
90 virtual ::Bedrock::PubSub::Subscription
91 registerContainerTypeListener(::std::function<
void(::SharedTypes::Legacy::ContainerType)> callback)
const
94 virtual void debitPlayerLevels(
int levels);
96 virtual bool isCreativeMode()
const;
98 virtual bool isClientSide()
const;
100 virtual bool isServerAuthoritative()
const;
102 virtual bool isValid(
float pickRange);
104 virtual void serverInitItemStackIds() ;
109 virtual ::ItemStack
const& getFullContainerSlot(
int slot,
::FullContainerName const& name)
const ;
111 virtual void broadcastChanges() ;
113 virtual ::ContainerScreenContext _postInit() = 0;
115 virtual void _onDynamicContainerContentsChanged();
121 MCAPI ContainerManagerModel(::ContainerID containerId,
::Player& player);
123 MCAPI
void _addContainer(::std::shared_ptr<::ContainerModel> containerModel);
125 MCAPI
void _addContainerToItemStackNetManager(
131 MCAPI ::ContainerScreenContext _containerScreenContext(
::ActorUniqueID actorId);
133 MCAPI ::ContainerScreenContext _containerScreenContext(
::BlockPos const& blockPos);
135 MCAPI ::std::shared_ptr<::ContainerModel> _getContainer(::ContainerEnumName collectionEnumName)
const;
137 MCAPI
bool _isPlayerInRangeOfPosition(
::BlockPos const& blockPos,
float pickRange)
const;
139 MCAPI
void addDynamicContainer(::std::shared_ptr<::ContainerModel> model);
142 MCAPI ::std::string getBlockDisplayName(
::BlockPos const& blockPos)
const;
144 MCAPI ::HashedString getBlockLocName(
::BlockPos const& blockPos)
const;
146 MCFOLD ::std::unordered_map<::std::string, ::std::shared_ptr<::ContainerModel>>& getContainers();
148 MCAPI ::std::shared_ptr<::ContainerModel> getDynamicContainer(
::FullContainerName const& name);
150 MCAPI ::HashedString getEntityLocName(
::ActorUniqueID const& actorUniqueID)
const;
152 MCAPI ::std::string getEntityName(
::ActorUniqueID const& actorUniqueID)
const;
155 MCFOLD ::Player& getPlayer()
const;
158 MCAPI
int getPlayerLevels()
const;
160 MCAPI
void grantExperience(
int amount);
163 MCAPI
void postInit();
166 MCAPI
void registerInformControllerOfDestructionCallback(
168 ::std::function<
void(::ContainerManagerModel&)> callback
176 MCAPI
static void _appendCopies(::std::vector<::ItemStack>& out, ::std::vector<::ItemStack>
const& items);
182 MCAPI
void* $ctor(::ContainerID containerId,
::Player& player);
196 MCFOLD ::ContainerID $getContainerId()
const;
198 MCFOLD
void $setContainerId(::ContainerID
id);
200 MCFOLD ::SharedTypes::Legacy::ContainerType $getContainerType()
const;
202 MCAPI
void $setContainerType(::SharedTypes::Legacy::ContainerType type);
204 MCAPI ::Bedrock::PubSub::Subscription
205 $registerContainerTypeListener(::std::function<
void(::SharedTypes::Legacy::ContainerType)> callback)
const;
207 MCAPI
void $debitPlayerLevels(
int levels);
209 MCAPI
bool $isCreativeMode()
const;
211 MCAPI
bool $isClientSide()
const;
213 MCAPI
bool $isServerAuthoritative()
const;
215 MCAPI
bool $isValid(
float pickRange);
217 MCAPI
void $serverInitItemStackIds();
221 MCAPI ::ItemStack
const& $getFullContainerSlot(
int slot,
::FullContainerName const& name)
const;
223 MCAPI
void $broadcastChanges();
225 MCFOLD
void $_onDynamicContainerContentsChanged();
233 MCAPI
static void** $vftable();