36 using BlockLookupMap = ::std::map<::HashedString, ::SharedPtr<::BlockLegacy>>;
38 using BlockAliasLookupMap = ::std::unordered_map<::HashedString, ::HashedString>;
43 : stateName(stateName),
60 using BlockComplexAliasCallback = ::std::function<
::Block const*(int)>;
66 ::ll::TypedStorage<8, 64, ::std::function<
::Block const*(int)>> mCallback;
67 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mMinRequiredVersion;
68 ::ll::TypedStorage<8, 24, ::SemVersion> mFlattenedInBlocksJsonVersion;
69 ::ll::TypedStorage<4, 4, int> mStartVariant;
83 MCNAPI ::BlockTypeRegistry::BlockComplexAliasContent&
96 using BlockComplexAliasLookupMap = ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>;
102 ::ll::TypedStorage<8, 8, ::WeakPtr<::BlockLegacy const>> mBlockLegacy;
103 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
131 using BlockComplexAliasPostSplitBlockNames = ::std::vector<::std::reference_wrapper<::HashedString const>>;
133 using BlockComplexAliasPostSplitBlockNamesList =
134 ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>;
136 using BlockComplexAliasPostSplitBlockNamesLookupMap = ::entt::dense_map<uint64, uint64>;
138 using BlockNameHashToHashedStringMap = ::entt::dense_map<uint64, ::HashedString>;
144 ::ll::TypedStorage<8, 8, ::BlockLegacy const&> mAirBlock;
154 enum class LookupByNameImplResolve :
int {
162 MCAPI static ::BlockTypeRegistryReadLock _lockAgainstRegistryModifications();
164 MCAPI static ::BlockTypeRegistryModificationsLock _lockForRegistryModifications();
166 MCAPI static ::BlockTypeRegistry::LookupByNameImplReturnType _lookupByNameImpl(
169 ::BlockTypeRegistry::LookupByNameImplResolve resolve,
170 bool logNotFound =
false
173 MCAPI
static void checkBlockPermutationCap();
175 MCAPI
static uint64 computeBlockTypeRegistryChecksum(
::BaseGameVersion const& worldBaseGameVersion);
177 MCAPI
static void finalizeBlockComponentStorage();
183 MCAPI static ::HashedString
const& getBlockNameFromNameHash(uint64 hash);
185 MCAPI static ::std::vector<::std::reference_wrapper<::HashedString const>>
const&
186 getComplexAliasPostSplitBlockNames(
::HashedString const& oldName);
188 MCAPI static ::Block
const& getDefaultBlockState(
::HashedString const& name,
bool logNotFound =
false);
190 MCAPI static ::BlockTypeRegistry::DirectAccessBlocks
const& getDirectAccessBlocks();
192 MCAPI
static void initHardCodedBlockComponents(
::Experiments const& experiments);
194 MCAPI
static bool isComplexAliasBlock(
::HashedString const& blockName);
196 MCAPI static ::WeakPtr<::BlockLegacy> lookupByName(
::HashedString const& name,
bool logNotFound =
false);
198 MCAPI
static void prepareBlocks(uint latestUpdaterVersion);
202 MCAPI
static void registerComplexAlias(
204 ::std::function<
::Block const*(
int)> callback,
205 ::std::vector<::std::reference_wrapper<::HashedString const>>
const& postSplitBlockNames,
212 MCAPI
static void setupDirectAccessBlocks();
216 MCAPI
static void unregisterBlocks();
222 MCAPI static ::std::unordered_map<::HashedString, ::HashedString>& mBlockAliasLookupMap();
224 MCAPI static ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>&
225 mBlockComplexAliasLookupMap();
227 MCAPI static ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>&
228 mBlockComplexAliasPostSplitBlockNamesList();
230 MCAPI static ::entt::dense_map<uint64, uint64>& mBlockComplexAliasPostSplitBlockNamesLookupMap();
232 MCAPI static ::std::map<::HashedString, ::HashedString>& mBlockComplexAliasPreSplitBlockNamesLookupMap();
234 MCAPI static ::std::map<::HashedString, ::SharedPtr<::BlockLegacy>>& mBlockLookupMap();
236 MCAPI static ::entt::dense_map<uint64, ::HashedString>& mBlockNameHashToStringMap();
238 MCAPI static ::std::unique_ptr<::BlockTypeRegistry::DirectAccessBlocks>& mDirectAccessBlocks();
240 MCAPI static ::std::set<::std::string>& mKnownNamespaces();
242 MCAPI static ::std::shared_ptr<::BlockTypeRegistryRWLock>& mRWLock();
Definition BlockTypeRegistry.h:62
MCAPI::Block const * operator()(int data) const
MCAPI::BlockTypeRegistry::BlockComplexAliasContent & operator=(::BlockTypeRegistry::BlockComplexAliasContent &&)