35class ItemRegistry :
public ::std::enable_shared_from_this<::ItemRegistry> {
46 using ItemRegistryMap = ::std::vector<::SharedPtr<::Item>>;
76 using CreativeItemsServerInitCallbackSignature =
173 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::cereal::ReflectionCtx>>> mCerealContext;
174 ::ll::TypedStorage<8, 24, ::std::vector<::SharedPtr<::Item>>> mItemRegistry;
175 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::WeakPtr<::Item>>> mIdToItemMap;
176 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mNameToItemMap;
177 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mTileNamespaceToItemMap;
178 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mTileItemNameToItemMap;
179 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ItemRegistry::ItemAlias>> mItemAliasLookupMap;
180 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::ItemRegistry::ItemHashAlias>> mReverseAliasLookupMap;
181 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::ItemRegistry::ItemHashAlias>>
182 mReverseFullNameAliasLookupMap;
183 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ItemRegistryComplexAlias>> mComplexAliasLookupMap;
184 ::ll::TypedStorage<8, 64, ::std::unordered_map<short, ::HashedString>> mLegacyIDToNameMap;
185 ::ll::TypedStorage<2, 2, short> mMaxItemID;
186 ::ll::TypedStorage<8, 24, ::std::vector<::HashedString>> mAttachableDefinitions;
187 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemTag, ::std::unordered_set<::Item const*>>> mTagToItemsMap;
188 ::ll::TypedStorage<8, 64, ::std::unordered_set<::Item const*>
const> mEmptyItemSet;
189 ::ll::TypedStorage<1, 1, bool> mServerInitializingCreativeItems;
190 ::ll::TypedStorage<1, 1, bool> mIsInitialized;
191 ::ll::TypedStorage<8, 64, ::std::function<void(
::ItemRegistryRef)>> mExtraItemInitCallback;
196 mFinishedInitServerPublisher;
197 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::atomic<int>>> mCanUpdateTags;
198 ::ll::TypedStorage<8, 24, ::std::vector<::SharedPtr<::Item>>> mDeadItemRegistry;
199 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mWorldBaseGameVersion;
200 ::ll::TypedStorage<1, 1, bool> mCheckForItemWorldCompatibility;
201 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::Bedrock::Threading::Mutex>> mCompatibilityCheckMutex;
202 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CreativeItemRegistry>> mCreativeItemRegistry;
213 MCAPI
void addItemToTagMap(
::Item const& item);
217 MCAPI
void clearItemAndCreativeItemRegistry();
219 MCAPI
void finishedRegistration();
221 MCAPI ::std::vector<::std::reference_wrapper<::HashedString const>>
const&
224 MCAPI ::WeakPtr<::Item> getItem(
short id);
226 MCAPI ::std::pair<::HashedString, int> getNameFromAlias(
::HashedString const& name,
int aux)
const;
228 MCAPI ::HashedString getNameFromLegacyID(
short id);
230 MCAPI
void initCreativeItemsServer(
242 MCAPI ::WeakPtr<::Item> lookupByName(
int& inOutItemAux, ::std::string_view inString)
const;
244 MCAPI ::WeakPtr<::Item> lookupByNameNoAlias(::std::string_view inString)
const;
246 MCAPI ::WeakPtr<::Item> lookupByNameNoParsing(
int& inOutItemAux,
::HashedString const& fullName)
const;
253 MCAPI ::WeakPtr<::Item>
258 MCAPI
void registerLegacyID(
::HashedString const& name,
short id);
260 MCAPI
void registerLegacyMapping(
266 MCAPI
void setCheckForItemWorldCompatibility(
bool value);
270 MCAPI ::std::vector<::std::string> validateServerItemComponents(::std::vector<::ItemData>
const& items);
278 MCAPI static ::std::vector<::ItemRegistry::LoadedItemAsset> _loadAllItemAssets(
284 MCAPI static ::ItemRegistry::ItemLoadResult _tryLoadItemAsset(
285 ::std::string jsonData,
286 ::std::shared_ptr<::IPackLoadContext> packLoadContext,
295 MCAPI static ::std::string_view
const& MINECRAFT_NAMESPACE();
Definition IPackLoadContext.h:17
Definition ItemParseContext.h:5