43class ItemRegistry :
public ::std::enable_shared_from_this<::ItemRegistry> {
59 ::ll::TypedStorage<8, 48, ::HashedString> currentName;
60 ::ll::TypedStorage<8, 32, ::BaseGameVersion> sinceVersion;
68 ::ll::TypedStorage<8, 8, uint64> aliasName;
69 ::ll::TypedStorage<8, 32, ::BaseGameVersion> sinceVersion;
77 ::ll::TypedStorage<8, 272, ::Bedrock::Resources::MinecraftDocumentInput> mDocumentInput;
78 ::ll::TypedStorage<1, 1, ::PackType> mPackType;
79 ::ll::TypedStorage<8, 96, ::PackLoadInfo> mPackLoadInfo;
80 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ItemEventResponseFactory>> mEventResponseFactory;
81 ::ll::TypedStorage<8, 32, ::std::string> mLoadedPackName;
82 ::ll::TypedStorage<1, 1, bool> mIsComponentBased;
90 ::ll::TypedStorage<8, 440, ::std::optional<::ItemRegistry::LoadedItemAsset>> mLoadedItemAsset;
91 ::ll::TypedStorage<8, 32, ::std::string> mError;
99 ::ll::TypedStorage<8, 32, ::std::string> mItemIdentifier;
100 ::ll::TypedStorage<8, 32, ::std::string> mParsedNamespace;
101 ::ll::TypedStorage<8, 32, ::std::string> mParsedName;
102 ::ll::TypedStorage<4, 4, int> mAux;
106 using CreativeItemsServerInitCallbackSignature = void(
121 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::cereal::ReflectionCtx>>> mCerealContext;
122 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator>> mValidator;
123 ::ll::TypedStorage<8, 8, ::gsl::not_null<::std::unique_ptr<::ItemLoaderTraits::Loader>>> mDocumentLoader;
124 ::ll::TypedStorage<8, 24, ::std::vector<::SharedPtr<::Item>>> mItemRegistry;
125 ::ll::TypedStorage<8, 64, ::std::unordered_map<int, ::WeakPtr<::Item>>> mIdToItemMap;
126 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mNameToItemMap;
127 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mTileNamespaceToItemMap;
128 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::WeakPtr<::Item>>> mTileItemNameToItemMap;
129 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ItemRegistry::ItemAlias>> mItemAliasLookupMap;
130 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::ItemRegistry::ItemHashAlias>> mReverseAliasLookupMap;
131 ::ll::TypedStorage<8, 64, ::std::unordered_map<uint64, ::ItemRegistry::ItemHashAlias>>
132 mReverseFullNameAliasLookupMap;
133 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::ItemRegistryComplexAlias>> mComplexAliasLookupMap;
134 ::ll::TypedStorage<8, 64, ::std::unordered_map<short, ::HashedString>> mLegacyIDToNameMap;
135 ::ll::TypedStorage<2, 2, short> mMaxItemID;
136 ::ll::TypedStorage<8, 24, ::std::vector<::HashedString>> mAttachableDefinitions;
137 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ItemTag, ::std::unordered_set<::Item const*>>> mTagToItemsMap;
138 ::ll::TypedStorage<8, 64, ::std::unordered_set<::Item const*>
const> mEmptyItemSet;
139 ::ll::TypedStorage<1, 1, bool> mServerInitializingCreativeItems;
140 ::ll::TypedStorage<1, 1, ::ItemRegistrationState> mItemRegistrationState;
141 ::ll::TypedStorage<8, 64, ::std::function<void(
::ItemRegistryRef)>> mExtraItemInitCallback;
146 mFinishedInitServerPublisher;
147 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::atomic<int>>> mCanUpdateTags;
148 ::ll::TypedStorage<8, 24, ::std::vector<::SharedPtr<::Item>>> mDeadItemRegistry;
149 ::ll::TypedStorage<1, 1, bool> mAddToPreRegistry;
150 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::SharedPtr<::Item>>>
151 mHardcodedVanillaItemPreRegistry;
152 ::ll::TypedStorage<1, 1, ::ItemRegistrationOrder> mItemRegistrationOrder;
153 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mWorldBaseGameVersion;
154 ::ll::TypedStorage<1, 1, bool> mCheckForItemWorldCompatibility;
155 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::std::mutex>> mCompatibilityCheckMutex;
156 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::CreativeItemRegistry>> mCreativeItemRegistry;
162 MCAPI ItemRegistry();
165 MCAPI
void _bindBetaItemTypes(
::Experiments const& experiments);
167 MCAPI
void _movePreRegistryToMainRegistry();
169 MCAPI
void _populateVanillaItemVersionMap(
178 MCAPI ::WeakPtr<::Item>
182 MCAPI ::ItemRegistry::ParsedName _tryParseItemName(
::Puv::Input const& input);
184 MCAPI ::ItemRegistryRef::LoadedItem
190 MCAPI
void buildClientRegistryFromServer(
191 ::std::vector<::ItemData>
const& serverItemData,
197 MCAPI
void clearItemAndCreativeItemRegistry();
200 MCAPI
void findAllAttachableDefinitions();
202 MCAPI
void finishedRegistration(
::Experiments const& experiments);
205 MCAPI ::std::vector<::std::reference_wrapper<::HashedString const>>
const&
210 MCAPI ::WeakPtr<::Item> getItem(
short id);
212 MCAPI ::std::pair<::HashedString, int> getNameFromAlias(
::HashedString const& name,
int aux)
const;
216 MCAPI ::WeakPtr<::Item> lookupByName(
int& inOutItemAux, ::std::string_view inString)
const;
218 MCAPI ::WeakPtr<::Item> lookupByName(
int& outItemId,
int& inOutItemAux, ::std::string_view inString)
const;
220 MCAPI ::WeakPtr<::Item> lookupByNameNoAlias(::std::string_view inString)
const;
222 MCAPI ::WeakPtr<::Item> lookupByNameNoParsing(
int& inOutItemAux,
::HashedString const& fullName)
const;
224 MCFOLD ::WeakPtr<::Item> lookupByVanillaName(
::HashedString const& inString)
const;
227 MCAPI
void populateClientItemData(
230 ::std::optional<::ItemIconInfo> (*iconFactory)(::std::string
const&,
int)
237 MCAPI ::WeakPtr<::Item>
242 MCAPI
void registerLegacyMapping(
248 MCAPI
void registerValidatorIdentifier(::std::string
const& str);
250 MCAPI uint64 remapToFullLegacyNameByHash(uint64 newHash);
252 MCAPI uint64 remapToLegacyNameByHash(uint64 newHash);
254 MCAPI
void shutdown();
258 MCAPI ::std::vector<::std::string> validateServerItemComponents(::std::vector<::ItemData>
const& items);
260 MCAPI ~ItemRegistry();
267 MCAPI static ::std::vector<::ItemRegistry::LoadedItemAsset> _loadAllItemAssets(