35 using DynamicContainerPublisher =
41 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::PlayerContainerRefresher>>> mContainerRefresher;
42 ::ll::TypedStorage<8, 16, ::gsl::not_null<::std::shared_ptr<::DynamicContainerTracker>>> mDynamicContainerTracker;
43 ::ll::TypedStorage<8, 16, ::WeakRef<::IContainerRegistryAccess>> mRegistryAccess;
44 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
45 ::ll::TypedStorage<8, 24, ::std::vector<::ItemStack>> mLastSlots;
46 ::ll::TypedStorage<1, 1, ::ContainerID> mContainerId;
47 ::ll::TypedStorage<1, 1, ::SharedTypes::Legacy::ContainerType> mContainerType;
52 void(::SharedTypes::Legacy::ContainerType),
55 mContainerTypeSubscribers;
60 mInformControllerOfDestructionCallbacks;
61 ::ll::TypedStorage<8, 40, ::ContainerScreenContext> mScreenContext;
62 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::shared_ptr<::ContainerModel>>> mContainers;
64 mOnDynamicContainerChangePublisher;
69 ContainerManagerModel& operator=(ContainerManagerModel
const&);
70 ContainerManagerModel(ContainerManagerModel
const&);
71 ContainerManagerModel();
76 virtual ~ContainerManagerModel() ;
80 virtual ::ContainerID getContainerId()
const ;
82 virtual void setContainerId(::ContainerID
id) ;
84 virtual ::SharedTypes::Legacy::ContainerType getContainerType()
const ;
86 virtual void setContainerType(::SharedTypes::Legacy::ContainerType type) ;
88 virtual ::Bedrock::PubSub::Subscription
89 registerContainerTypeListener(::std::function<
void(::SharedTypes::Legacy::ContainerType)> callback)
const
92 virtual void debitPlayerLevels(
int levels);
94 virtual bool isCreativeMode()
const;
96 virtual bool isClientSide()
const;
98 virtual bool isServerAuthoritative()
const;
100 virtual bool isValid(
float pickRange);
102 virtual void serverInitItemStackIds() ;
107 virtual ::ItemStack
const& getFullContainerSlot(
int slot,
::FullContainerName const& name)
const ;
109 virtual void broadcastChanges() ;
111 virtual ::ContainerScreenContext _postInit() = 0;
113 virtual void _onDynamicContainerContentsChanged();
119 MCAPI ContainerManagerModel(::ContainerID containerId,
::Player& player);
121 MCAPI
void _addContainer(::std::shared_ptr<::ContainerModel> containerModel);
123 MCAPI ::std::shared_ptr<::ContainerModel> _getContainer(::ContainerEnumName collectionEnumName)
const;
126 MCAPI
void addDynamicContainer(::std::shared_ptr<::ContainerModel> model);
128 MCAPI ::std::string getBlockDisplayName(
::BlockPos const& blockPos)
const;
130 MCAPI ::HashedString getBlockLocName(
::BlockPos const& blockPos)
const;
132 MCAPI ::HashedString getEntityLocName(
::ActorUniqueID const& actorUniqueID)
const;
134 MCAPI ::std::string getEntityName(
::ActorUniqueID const& actorUniqueID)
const;
137 MCAPI
void postInit();
143 MCAPI
void* $ctor(::ContainerID containerId,
::Player& player);
157 MCFOLD ::ContainerID $getContainerId()
const;
159 MCAPI
void $setContainerId(::ContainerID
id);
161 MCAPI ::SharedTypes::Legacy::ContainerType $getContainerType()
const;
163 MCAPI
void $setContainerType(::SharedTypes::Legacy::ContainerType type);
165 MCAPI ::Bedrock::PubSub::Subscription
166 $registerContainerTypeListener(::std::function<
void(::SharedTypes::Legacy::ContainerType)> callback)
const;
168 MCAPI
void $debitPlayerLevels(
int levels);
170 MCAPI
bool $isCreativeMode()
const;
172 MCAPI
bool $isClientSide()
const;
174 MCAPI
bool $isServerAuthoritative()
const;
176 MCAPI
bool $isValid(
float pickRange);
178 MCAPI
void $serverInitItemStackIds();
182 MCAPI ::ItemStack
const& $getFullContainerSlot(
int slot,
::FullContainerName const& name)
const;
184 MCAPI
void $broadcastChanges();
186 MCFOLD
void $_onDynamicContainerContentsChanged();