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;
117 MCAPI ContainerManagerModel(::ContainerID containerId,
::Player& player);
119 MCAPI
void _addContainer(::std::shared_ptr<::ContainerModel> containerModel);
121 MCAPI ::std::shared_ptr<::ContainerModel> _getContainer(::ContainerEnumName collectionEnumName)
const;
123 MCAPI
bool _isPlayerInRangeOfPosition(
::BlockPos const& blockPos,
float pickRange)
const;
125 MCAPI
void addDynamicContainer(::std::shared_ptr<::ContainerModel> model);
127 MCAPI_C
bool blockHasCustomName(
::BlockPos const& blockPos)
const;
129 MCAPI_C ::std::string getBlockDisplayName(
::BlockPos const& blockPos)
const;
131 MCAPI_C ::HashedString getBlockLocName(
::BlockPos const& blockPos)
const;
133 MCAPI_C ::std::shared_ptr<::ContainerModel> getDynamicContainer(
::FullContainerName const& name);
135 MCAPI_C ::HashedString getEntityLocName(
::ActorUniqueID const& actorUniqueID)
const;
137 MCAPI_C ::std::string getEntityName(
::ActorUniqueID const& actorUniqueID)
const;
139 MCAPI_C
int getPlayerLevels()
const;
141 MCAPI_C
void grantExperience(
int amount);
143 MCAPI
void postInit();
149 MCAPI
void* $ctor(::ContainerID containerId,
::Player& player);
163 MCFOLD ::ContainerID $getContainerId()
const;
165 MCFOLD
void $setContainerId(::ContainerID
id);
167 MCFOLD ::SharedTypes::Legacy::ContainerType $getContainerType()
const;
169 MCAPI
void $setContainerType(::SharedTypes::Legacy::ContainerType type);
171 MCAPI ::Bedrock::PubSub::Subscription
172 $registerContainerTypeListener(::std::function<
void(::SharedTypes::Legacy::ContainerType)> callback)
const;
174 MCAPI
void $debitPlayerLevels(
int levels);
176 MCAPI
bool $isCreativeMode()
const;
178 MCAPI
bool $isClientSide()
const;
180 MCAPI
bool $isServerAuthoritative()
const;
182 MCAPI
bool $isValid(
float pickRange);
184 MCAPI
void $serverInitItemStackIds();
188 MCAPI ::ItemStack
const& $getFullContainerSlot(
int slot,
::FullContainerName const& name)
const;
190 MCAPI
void $broadcastChanges();