LeviLamina
Loading...
Searching...
No Matches
Block Class Reference

Public Types

using BlockStateValueType = std::variant<int, float, bool, std::string>
 
using BlockStatesType = std::vector<std::pair<std::string, BlockStateValueType>>
 

Public Member Functions

std::string const & getTypeName () const
 
short getBlockItemId () const
 
ushort getData () const
 
template<typename T >
std::optional< T > getState (uint64 id) const
 
template<typename T >
std::optional< T > getState (BlockState const &state) const
 
template<typename T >
optional_ref< Block const > setState (uint64 id, T value) const
 
template<typename T >
optional_ref< Block const > setState (BlockState const &state, T value) const
 
MCAPI Block (ushort data, ::gsl::not_null<::BlockLegacy * > oldBlock)
 
MCAPI Block (ushort data, ::gsl::not_null<::BlockLegacy * > oldBlock, ::CompoundTag serId, uint const &runId)
 
MCAPI void _queueForTickBasedOnComponentConfiguration (::BlockSource &region, ::BlockPos const &pos, ::Random &random, bool placingBlock) const
 
MCAPI void _removeFromTickingQueues (::BlockSource &region, ::BlockPos const &pos) const
 
MCAPI::ItemInstance asItemInstance (::BlockSource &region, ::BlockPos const &position, bool withData) const
 
MCAPI bool breaksFallingBlocks (::BaseGameVersion version) const
 
MCAPI::std::string buildDescriptionName () const
 
MCAPI void buildSerializationId (uint latestUpdaterVersion)
 
MCAPI::std::string buildSerializationIdString () const
 
MCAPI bool canProvideFullSupport (uchar face) const
 
MCAPI bool canSurvive (::BlockSource &region, ::BlockPos const &pos) const
 
MCAPI::HitResult clip (::BlockPos const &pos, ::Vec3 const &A, ::Vec3 const &B, ::AABB const &aabb) const
 
MCAPI::HitResult clip (::BlockSource const &region, ::BlockPos const &pos, ::Vec3 const &A, ::Vec3 const &B, ::ShapeType shapeType, ::optional_ref<::GetCollisionShapeInterface const > entity) const
 
MCAPI uint computeRawSerializationIdHashForNetwork () const
 
MCAPI::Block const & copyState (::Block const &fromBlock, ::BlockState const &state) const
 
MCAPI void executeItemEvent (::ItemStackBase &item, ::std::string const &eventName, ::BlockSource &region, ::BlockPos const &pos, ::Actor *actor) const
 
MCAPI bool getCollisionShape (::AABB &outAABB, ::IConstBlockSource const &region, ::BlockPos const &pos, ::optional_ref<::GetCollisionShapeInterface const > entity) const
 
MCAPI::std::string getDescriptionId () const
 
MCAPI::BlockLegacy const & getLegacyBlock () const
 
MCAPI::mce::Color getMapColor (::BlockSource &region, ::BlockPos const &pos) const
 
MCAPI::Block const & getStateFromLegacyData (ushort data) const
 
MCAPI bool hasState (::BlockState const &stateType) const
 
MCAPI bool hasTag (::HashedString const &tagName) const
 
MCAPI bool isAir () const
 
MCAPI bool isButtonBlock () const
 
MCAPI bool isCropBlock () const
 
MCAPI bool isDoorBlock () const
 
MCFOLD bool isMotionBlockingBlock () const
 
MCAPI bool isPartialBlock (::BlockSource const &region, ::BlockPos const &pos) const
 
MCAPI bool isPreservingMediumWhenPlaced (::Block const &medium) const
 
MCAPI bool isSlabBlock () const
 
MCAPI bool isSolidBlockingBlock () const
 
MCAPI bool isSolidBlockingBlockAndNotSignalSource () const
 
MCAPI bool isTopPartialBlock (::BlockSource const &region, ::BlockPos const &pos) const
 
MCAPI bool isValidAuxValue (int value) const
 
MCAPI bool mayPlace (::BlockSource &region, ::BlockPos const &pos, uchar face) const
 
MCAPI void neighborChanged (::BlockSource &region, ::BlockPos const &pos, ::BlockPos const &neighborPos) const
 
MCAPI void onFallOn (::BlockSource &region, ::BlockPos const &pos, ::Actor &entity, float fallDistance) const
 
MCAPI void onPlace (::BlockSource &region, ::BlockPos const &pos, ::Block const &previousBlock) const
 
MCAPI void onStepOff (::Actor &entity, ::BlockPos const &pos) const
 
MCAPI void onStepOn (::Actor &entity, ::BlockPos const &pos) const
 
MCAPI void playerDestroy (::Player &player, ::BlockPos const &pos) const
 
MCAPI::ItemActor * popResource (::BlockSource &region, ::BlockPos const &pos, ::ItemInstance const &itemInstance) const
 
MCAPI void queuedTick (::BlockSource &region, ::BlockPos const &pos, ::Random &random) const
 
MCAPI void randomTick (::BlockSource &region, ::BlockPos const &pos, ::Random &random) const
 
MCAPI::Block const & sanitizeFillBlock () const
 
MCAPI bool shouldRandomTick () const
 
MCAPI::std::string toDebugString () const
 
MCAPI bool use (::Player &player, ::BlockPos const &pos, uchar face, ::std::optional<::Vec3 > hit) const
 
MCAPI void * $ctor (ushort data, ::gsl::not_null<::BlockLegacy * > oldBlock)
 
MCAPI void * $ctor (ushort data, ::gsl::not_null<::BlockLegacy * > oldBlock, ::CompoundTag serId, uint const &runId)
 

Static Public Member Functions

static LLNDAPI optional_ref< Block const > tryGetFromRegistry (uint runtimeID)
 
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (std::string_view name)
 
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (std::string_view name, ushort legacyData)
 
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (uint legacyBlockID, ushort legacyData)
 
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (std::string_view name, BlockStatesType const &states)
 
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (CompoundTag const &nbt)
 
static MCAPI ::std::string const & BLOCK_DESCRIPTION_PREFIX ()
 
static MCAPI void ** $vftable ()
 

Public Attributes

::ll::TypedStorage< 8, 104, ::BlockComponentStoragemComponents
 
::ll::TypedStorage< 2, 2, ushort const > mData
 
::ll::TypedStorage< 8, 8, ::gsl::not_null<::BlockLegacy * > > mLegacyBlock
 
::ll::TypedStorage< 4, 8, ::CachedComponentDatamCachedComponentData
 
::ll::TypedStorage< 8, 104, ::BlockComponentDirectDatamDirectData
 
::ll::TypedStorage< 8, 24, ::std::vector<::HashedString > > mTags
 
::ll::TypedStorage< 8, 24, ::CompoundTagmSerializationId
 
::ll::TypedStorage< 8, 8, uint64 > mSerializationIdHash
 
::ll::TypedStorage< 4, 4, uint > mSerializationIdHashForNetwork
 
::ll::TypedStorage< 4, 4, uint > mNetworkId
 
::ll::TypedStorage< 1, 1, bool > mHasRuntimeId
 

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