Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
BlockTypeRegistry Class Reference

Classes

struct  BlockComplexAliasBlockState
class  BlockComplexAliasContent
struct  DirectAccessBlocks
struct  LookupByNameImplReturnType

Public Types

enum class  LookupByNameImplResolve : int { BlockType = 0 , Block = 1 }
using BlockAliasLookupMap = ::std::unordered_map<::HashedString, ::HashedString>
using BlockComplexAliasCallback = ::std::function<::Block const*(int)>
using BlockComplexAliasLookupMap = ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent>
using BlockComplexAliasPostSplitBlockNames = ::std::vector<::std::reference_wrapper<::HashedString const>>
using BlockComplexAliasPostSplitBlockNamesList
using BlockComplexAliasPostSplitBlockNamesLookupMap = ::entt::dense_map<uint64, uint64>
using BlockLookupMap = ::std::map<::HashedString, ::std::unique_ptr<::BlockType>>
using BlockNameHashToHashedStringMap = ::entt::dense_map<uint64, ::HashedString>

Public Member Functions

template<class TBlockType, class... Args>
TBlockType & registerBlock (::HashedString const &blockName, Args &&... args)
 Constructs a new block of type TBlockType and registers it under blockName.
::Block const * lookupByName (::HashedString const &name, ::std::vector<::BlockTypeRegistry::BlockComplexAliasBlockState > const &states, bool logNotFound) const
::BlockType const * lookupByName (::HashedString const &name, bool logNotFound=false) const
LLAPI void finalizeBlockComponentStorage ()
MCAPI BlockTypeRegistry ()
MCAPI::BlockTypeRegistry::LookupByNameImplReturnType _lookupByNameImpl (::HashedString const &name, int data, ::BlockTypeRegistry::LookupByNameImplResolve resolve, bool logNotFound) const
MCAPI::Block const * _lookupByNameImplSetNewBlockStates (::Block const &block, ::std::vector<::BlockTypeRegistry::BlockComplexAliasBlockState > const &states) const
MCAPI void checkBlockPermutationCap () const
MCAPI uint64 computeBlockTypeRegistryChecksum (::BaseGameVersion const &worldBaseGameVersion) const
MCAPI void finalizeBlockCustomComponentEvents (::ServerScriptManager const &scriptManager)
MCAPI::HashedString const & getBlockNameFromNameHash (uint64 hash) const
MCAPI ::std::vector<::std::reference_wrapper<::HashedString const > > const & getComplexAliasPostSplitBlockNames (::HashedString const &oldName) const
MCAPI::Block const & getDefaultBlockState (::HashedString const &name, bool logNotFound=false) const
MCAPI bool isComplexAliasBlock (::HashedString const &blockName) const
MCAPI void prepareBlocks (uint latestUpdaterVersion)
MCAPI void registerAlias (::HashedString const &alias, ::HashedString const &name)
MCAPI void registerComplexAlias (::HashedString const &alias, ::std::function<::Block const *(int)> callback, ::std::vector<::std::reference_wrapper<::HashedString const > > const &postSplitBlockNames, ::BaseGameVersion const &minRequiredVersion, ::SemVersion const &blocksJsonFormatVersion, ::HashedString defaultNewBlockName, int startVariant)
MCAPI void unregisterBlocks ()
MCAPI ~BlockTypeRegistry ()
MCAPI void * $ctor ()
MCAPI void $dtor ()

Static Public Member Functions

static ::BlockTypeRegistry & get ()
static MCAPI ::Bedrock::Owner<::BlockTypeRegistry > & mBlockTypeRegistry ()

Public Attributes

::ll::TypedStorage< 8, 16, ::std::map<::HashedString, ::std::unique_ptr<::BlockType > > > mBlockLookupMap
::ll::TypedStorage< 8, 64, ::std::unordered_map<::HashedString, ::HashedString > > mBlockAliasLookupMap
::ll::TypedStorage< 8, 72, ::entt::dense_map<::HashedString, ::BlockTypeRegistry::BlockComplexAliasContent > > mBlockComplexAliasLookupMap
::ll::TypedStorage< 8, 24, ::std::vector<::std::vector<::std::reference_wrapper<::HashedString const > > > > mBlockComplexAliasPostSplitBlockNamesList
::ll::TypedStorage< 8, 72, ::entt::dense_map< uint64, uint64 > > mBlockComplexAliasPostSplitBlockNamesLookupMap
::ll::TypedStorage< 8, 16, ::std::map<::HashedString, ::HashedString > > mBlockComplexAliasPreSplitBlockNamesLookupMap
::ll::TypedStorage< 8, 16, ::std::set<::std::string > > mKnownNamespaces
::ll::TypedStorage< 8, 72, ::entt::dense_map< uint64, ::HashedString > > mBlockNameHashToStringMap
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::BlockTypeRegistry::DirectAccessBlocks > > mDirectAccessBlocks
::ll::TypedStorage< 8, 16, ::std::shared_ptr<::VoxelShapes::VoxelShapeRegistry > > mShapeRegistry

Member Typedef Documentation

◆ BlockComplexAliasPostSplitBlockNamesList

using BlockTypeRegistry::BlockComplexAliasPostSplitBlockNamesList
Initial value:
::std::vector<::std::vector<::std::reference_wrapper<::HashedString const>>>

Constructor & Destructor Documentation

◆ BlockTypeRegistry()

MCAPI BlockTypeRegistry::BlockTypeRegistry ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ ~BlockTypeRegistry()

MCAPI BlockTypeRegistry::~BlockTypeRegistry ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

Member Function Documentation

◆ _lookupByNameImplSetNewBlockStates()

MCAPI::Block const * BlockTypeRegistry::_lookupByNameImplSetNewBlockStates ( ::Block const & block,
::std::vector<::BlockTypeRegistry::BlockComplexAliasBlockState > const & states ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ checkBlockPermutationCap()

MCAPI void BlockTypeRegistry::checkBlockPermutationCap ( ) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ computeBlockTypeRegistryChecksum()

MCAPI uint64 BlockTypeRegistry::computeBlockTypeRegistryChecksum ( ::BaseGameVersion const & worldBaseGameVersion) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ finalizeBlockCustomComponentEvents()

MCAPI void BlockTypeRegistry::finalizeBlockCustomComponentEvents ( ::ServerScriptManager const & scriptManager)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ getComplexAliasPostSplitBlockNames()

MCAPI ::std::vector<::std::reference_wrapper<::HashedString const > > const & BlockTypeRegistry::getComplexAliasPostSplitBlockNames ( ::HashedString const & oldName) const
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ prepareBlocks()

MCAPI void BlockTypeRegistry::prepareBlocks ( uint latestUpdaterVersion)
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ registerAlias()

MCAPI void BlockTypeRegistry::registerAlias ( ::HashedString const & alias,
::HashedString const & name )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ registerComplexAlias()

MCAPI void BlockTypeRegistry::registerComplexAlias ( ::HashedString const & alias,
::std::function<::Block const *(int)> callback,
::std::vector<::std::reference_wrapper<::HashedString const > > const & postSplitBlockNames,
::BaseGameVersion const & minRequiredVersion,
::SemVersion const & blocksJsonFormatVersion,
::HashedString defaultNewBlockName,
int startVariant )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ unregisterBlocks()

MCAPI void BlockTypeRegistry::unregisterBlocks ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $ctor()

MCAPI void * BlockTypeRegistry::$ctor ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

◆ $dtor()

MCAPI void BlockTypeRegistry::$dtor ( )
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

The documentation for this class was generated from the following file: