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;
82 MCNAPI ::BlockTypeRegistry::BlockComplexAliasContent&
95 using BlockComplexAliasLookupMap = ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>;
101 ::ll::TypedStorage<8, 8, ::WeakPtr<::BlockLegacy const>> mBlockLegacy;
102 ::ll::TypedStorage<8, 8, ::Block const*> mBlock;
130 using BlockComplexAliasPostSplitBlockNames = ::std::vector<::std::reference_wrapper<::HashedString const>>;
132 using BlockComplexAliasPostSplitBlockNamesList =
133 ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>;
135 using BlockComplexAliasPostSplitBlockNamesLookupMap = ::entt::dense_map<uint64, uint64>;
137 using BlockNameHashToHashedStringMap = ::entt::dense_map<uint64, ::HashedString>;
143 ::ll::TypedStorage<8, 8, ::BlockLegacy const&> mAirBlock;
153 enum class LookupByNameImplResolve :
int {
161 MCAPI static ::BlockTypeRegistryReadLock _lockAgainstRegistryModifications();
163 MCAPI static ::BlockTypeRegistryModificationsLock _lockForRegistryModifications();
165 MCAPI static ::BlockTypeRegistry::LookupByNameImplReturnType _lookupByNameImpl(
168 ::BlockTypeRegistry::LookupByNameImplResolve resolve,
169 bool logNotFound =
false
172 MCAPI
static void checkBlockPermutationCap();
174 MCAPI
static uint64 computeBlockTypeRegistryChecksum(
::BaseGameVersion const& worldBaseGameVersion);
176 MCAPI
static void finalizeBlockComponentStorage();
180 MCAPI
static void forEachBlock(::std::function<
bool(
::BlockLegacy const&)> callback);
182 MCAPI static ::HashedString
const& getBlockNameFromNameHash(uint64 hash);
184 MCAPI static ::std::vector<::std::reference_wrapper<::HashedString const>>
const&
185 getComplexAliasPostSplitBlockNames(
::HashedString const& oldName);
187 MCAPI static ::Block
const& getDefaultBlockState(
::HashedString const& name,
bool logNotFound =
false);
189 MCAPI static ::BlockTypeRegistry::DirectAccessBlocks
const& getDirectAccessBlocks();
191 MCAPI
static void initHardCodedBlockComponents(
::Experiments const& experiments);
193 MCAPI
static bool isComplexAliasBlock(
::HashedString const& blockName);
195 MCAPI static ::WeakPtr<::BlockLegacy> lookupByName(
::HashedString const& name,
bool logNotFound =
false);
197 MCAPI
static void prepareBlocks(uint latestUpdaterVersion);
201 MCAPI
static void registerComplexAlias(
203 ::std::function<
::Block const*(
int)> callback,
204 ::std::vector<::std::reference_wrapper<::HashedString const>>
const& postSplitBlockNames,
211 MCAPI
static void setupDirectAccessBlocks();
215 MCAPI
static void unregisterBlocks();
221 MCAPI static ::std::unordered_map<::HashedString, ::HashedString>& mBlockAliasLookupMap();
223 MCAPI static ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>&
224 mBlockComplexAliasLookupMap();
226 MCAPI static ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>&
227 mBlockComplexAliasPostSplitBlockNamesList();
229 MCAPI static ::entt::dense_map<uint64, uint64>& mBlockComplexAliasPostSplitBlockNamesLookupMap();
231 MCAPI static ::std::map<::HashedString, ::HashedString>& mBlockComplexAliasPreSplitBlockNamesLookupMap();
233 MCAPI static ::std::map<::HashedString, ::SharedPtr<::BlockLegacy>>& mBlockLookupMap();
235 MCAPI static ::entt::dense_map<uint64, ::HashedString>& mBlockNameHashToStringMap();
237 MCAPI static ::std::unique_ptr<::BlockTypeRegistry::DirectAccessBlocks>& mDirectAccessBlocks();
239 MCAPI static ::std::set<::std::string>& mKnownNamespaces();
241 MCAPI static ::std::shared_ptr<::BlockTypeRegistryRWLock>& mRWLock();
Definition BlockTypeRegistry.h:61
MCAPI::Block const * operator()(int data) const
MCAPI::BlockTypeRegistry::BlockComplexAliasContent & operator=(::BlockTypeRegistry::BlockComplexAliasContent &&)