39class ItemRegistry :
public ::std::enable_shared_from_this<::ItemRegistry> {
50 using ItemRegistryMap = ::std::vector<::SharedPtr<::Item>>;
80 using CreativeItemsServerInitCallbackSignature = void(
184 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::cereal::ReflectionCtx>>> mCerealContext;
185 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator>> mValidator;
186 ::ll::TypedStorage<8, 24, ::std::vector<::SharedPtr<::Item>>> mItemRegistry;
187 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::WeakPtr<::Item>>> mIdToItemMap;
188 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mNameToItemMap;
189 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mTileNamespaceToItemMap;
190 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mTileItemNameToItemMap;
191 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ItemRegistry::ItemAlias>> mItemAliasLookupMap;
192 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::ItemRegistry::ItemHashAlias>> mReverseAliasLookupMap;
193 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::ItemRegistry::ItemHashAlias>>
194 mReverseFullNameAliasLookupMap;
195 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ItemRegistryComplexAlias>> mComplexAliasLookupMap;
196 ::ll::TypedStorage<8, 64, ::std::unordered_map<short, ::HashedString>> mLegacyIDToNameMap;
197 ::ll::TypedStorage<2, 2, short> mMaxItemID;
198 ::ll::TypedStorage<8, 24, ::std::vector<::HashedString>> mAttachableDefinitions;
199 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemTag, ::std::unordered_set<::Item const*>>> mTagToItemsMap;
200 ::ll::TypedStorage<8, 64, ::std::unordered_set<::Item const*>
const> mEmptyItemSet;
201 ::ll::TypedStorage<1, 1, bool> mServerInitializingCreativeItems;
202 ::ll::TypedStorage<1, 1, bool> mIsInitialized;
203 ::ll::TypedStorage<8, 64, ::std::function<void(
::ItemRegistryRef)>> mExtraItemInitCallback;
208 mFinishedInitServerPublisher;
209 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::atomic<int>>> mCanUpdateTags;
210 ::ll::TypedStorage<8, 24, ::std::vector<::SharedPtr<::Item>>> mDeadItemRegistry;
211 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mWorldBaseGameVersion;
212 ::ll::TypedStorage<1, 1, bool> mCheckForItemWorldCompatibility;
213 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Threading::Mutex>> mCompatibilityCheckMutex;
214 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CreativeItemRegistry>> mCreativeItemRegistry;
225 MCAPI
void addItemToTagMap(
::Item const& item);
229 MCAPI
void clearItemAndCreativeItemRegistry();
231 MCAPI
void finishedRegistration();
233 MCAPI ::std::vector<::std::reference_wrapper<::HashedString const>>
const&
236 MCAPI ::WeakPtr<::Item> getItem(
short id);
238 MCAPI ::std::pair<::HashedString, int> getNameFromAlias(
::HashedString const& name,
int aux)
const;
240 MCAPI ::HashedString getNameFromLegacyID(
short id);
242 MCAPI
void initCreativeItemsServer(
246 ::std::function<
void(
257 MCAPI
void initServer(
264 MCAPI ::WeakPtr<::Item> lookupByName(
int& inOutItemAux, ::std::string_view inString)
const;
266 MCAPI ::WeakPtr<::Item> lookupByNameNoAlias(::std::string_view inString)
const;
268 MCAPI ::WeakPtr<::Item> lookupByNameNoParsing(
int& inOutItemAux,
::HashedString const& fullName)
const;
270 MCAPI
void onLevelInit(
279 MCAPI ::WeakPtr<::Item>
284 MCAPI
void registerLegacyID(
::HashedString const& name,
short id);
286 MCAPI
void registerLegacyMapping(
292 MCAPI
void setCheckForItemWorldCompatibility(
bool value);
296 MCAPI ::std::vector<::std::string> validateServerItemComponents(::std::vector<::ItemData>
const& items);
304 MCAPI static ::std::vector<::ItemRegistry::LoadedItemAsset> _loadAllItemAssets(
311 MCAPI static ::ItemRegistry::ItemLoadResult _tryLoadItemAsset(
312 ::std::string jsonData,
313 ::std::shared_ptr<::IPackLoadContext> packLoadContext,
322 MCAPI static ::std::string_view
const& MINECRAFT_NAMESPACE();
Definition IPackLoadContext.h:20
Definition ItemParseContext.h:5