35 using BlockLookupMap = ::std::map<::HashedString, ::SharedPtr<::BlockLegacy>>;
37 using BlockAliasLookupMap = ::std::unordered_map<::HashedString, ::HashedString>;
42 : stateName(stateName),
59 using BlockComplexAliasCallback = ::std::function<
::Block const*(int)>;
65 ::ll::TypedStorage<8, 64, ::std::function<
::Block const*(int)>> mCallback;
66 ::ll::TypedStorage<8, 32, ::BaseGameVersion> mMinRequiredVersion;
67 ::ll::TypedStorage<8, 24, ::SemVersion> mFlattenedInBlocksJsonVersion;
68 ::ll::TypedStorage<4, 4, int> mStartVariant;
79 MCAPI ::Block
const* operator()(
int data)
const;
93 using BlockComplexAliasLookupMap = ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>;
99 ::ll::TypedStorage<8, 8, ::WeakPtr<::BlockLegacy const>> mBlockLegacy;
100 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
116 MCAPI
void* $ctor(
::Block const* block,
bool resolveBlockLegacy);
124 using BlockComplexAliasPostSplitBlockNames = ::std::vector<::std::reference_wrapper<::HashedString const>>;
126 using BlockComplexAliasPostSplitBlockNamesList =
127 ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>;
129 using BlockComplexAliasPostSplitBlockNamesLookupMap = ::entt::dense_map<uint64, uint64>;
131 using BlockNameHashToHashedStringMap = ::entt::dense_map<uint64, ::HashedString>;
137 ::ll::TypedStorage<8, 8, ::BlockLegacy const&> mAirBlock;
141 enum class LookupByNameImplResolve :
int {
149 MCAPI static ::BlockTypeRegistryReadLock _lockAgainstRegistryModifications();
151 MCAPI static ::BlockTypeRegistryModificationsLock _lockForRegistryModifications();
153 MCAPI static ::BlockTypeRegistry::LookupByNameImplReturnType _lookupByNameImpl(
156 ::BlockTypeRegistry::LookupByNameImplResolve resolve,
157 bool logNotFound =
false
160 MCAPI
static void checkBlockPermutationCap();
162 MCAPI
static uint64 computeBlockTypeRegistryChecksum(
::BaseGameVersion const& worldBaseGameVersion);
164 MCAPI
static void finalizeBlockComponentStorage();
168 MCAPI
static void forEachBlock(::std::function<
bool(
::BlockLegacy const&)> callback);
170 MCAPI static ::HashedString
const& getBlockNameFromNameHash(uint64 hash);
172 MCAPI static ::std::vector<::std::reference_wrapper<::HashedString const>>
const&
173 getComplexAliasPostSplitBlockNames(
::HashedString const& oldName);
175 MCAPI static ::Block
const& getDefaultBlockState(
::HashedString const& name,
bool logNotFound =
false);
177 MCAPI static ::BlockTypeRegistry::DirectAccessBlocks
const& getDirectAccessBlocks();
179 MCAPI
static void initHardCodedBlockComponents(
::Experiments const& experiments);
181 MCAPI
static bool isComplexAliasBlock(
::HashedString const& blockName);
183 MCAPI static ::WeakPtr<::BlockLegacy> lookupByName(
::HashedString const& name,
bool logNotFound =
false);
185 MCAPI
static void prepareBlocks(uint latestUpdaterVersion);
189 MCAPI
static void registerComplexAlias(
191 ::std::function<
::Block const*(
int)> callback,
192 ::std::vector<::std::reference_wrapper<::HashedString const>>
const& postSplitBlockNames,
199 MCAPI
static void setupDirectAccessBlocks();
203 MCAPI
static void unregisterBlocks();
209 MCAPI static ::std::unordered_map<::HashedString, ::HashedString>& mBlockAliasLookupMap();
211 MCAPI static ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>&
212 mBlockComplexAliasLookupMap();
214 MCAPI static ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>&
215 mBlockComplexAliasPostSplitBlockNamesList();
217 MCAPI static ::entt::dense_map<uint64, uint64>& mBlockComplexAliasPostSplitBlockNamesLookupMap();
219 MCAPI static ::std::map<::HashedString, ::HashedString>& mBlockComplexAliasPreSplitBlockNamesLookupMap();
221 MCAPI static ::std::map<::HashedString, ::SharedPtr<::BlockLegacy>>& mBlockLookupMap();
223 MCAPI static ::entt::dense_map<uint64, ::HashedString>& mBlockNameHashToStringMap();
225 MCAPI static ::std::unique_ptr<::BlockTypeRegistry::DirectAccessBlocks>& mDirectAccessBlocks();
227 MCAPI static ::std::set<::std::string>& mKnownNamespaces();
229 MCAPI static ::std::shared_ptr<::BlockTypeRegistryRWLock>& mRWLock();
Definition BlockTypeRegistry.h:61