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();
115 virtual void setSelectedRecipeIndex(
int recipeIndex,
bool fromNetwork) ;
117 virtual ::std::optional<int> getSelectedRecipeIndex()
const ;
123 MCAPI ContainerManagerModel(::ContainerID containerId,
::Player& player);
125 MCNAPI
void _addContainer(::std::shared_ptr<::ContainerModel> containerModel);
127 MCAPI ::std::shared_ptr<::ContainerModel> _getContainer(::ContainerEnumName collectionEnumName)
const;
132 MCNAPI ::std::string getBlockDisplayName(
::BlockPos const& blockPos)
const;
134 MCNAPI ::HashedString getBlockLocName(
::BlockPos const& blockPos)
const;
136 MCNAPI ::HashedString getEntityLocName(
::ActorUniqueID const& actorUniqueID)
const;
138 MCNAPI ::std::string getEntityName(
::ActorUniqueID const& actorUniqueID)
const;
141 MCAPI
void postInit();
147 MCAPI
void* $ctor(::ContainerID containerId,
::Player& player);
161 MCFOLD ::ContainerID $getContainerId()
const;
163 MCAPI
void $setContainerId(::ContainerID
id);
165 MCFOLD ::SharedTypes::Legacy::ContainerType $getContainerType()
const;
167 MCAPI
void $setContainerType(::SharedTypes::Legacy::ContainerType type);
169 MCAPI ::Bedrock::PubSub::Subscription
170 $registerContainerTypeListener(::std::function<
void(::SharedTypes::Legacy::ContainerType)> callback)
const;
172 MCAPI
void $debitPlayerLevels(
int levels);
174 MCAPI
bool $isCreativeMode()
const;
176 MCAPI
bool $isClientSide()
const;
178 MCAPI
bool $isServerAuthoritative()
const;
182 MCAPI
void $serverInitItemStackIds();
186 MCAPI ::ItemStack
const& $getFullContainerSlot(
int slot,
::FullContainerName const& name)
const;
188 MCAPI
void $broadcastChanges();