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

LLNDAPI bool isAir () const
BlockType const & getBlockType () const
std::string const & getTypeName () const
unsigned 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
bool operator== (Block const &other) const
MCAPI Block (ushort data, ::gsl::not_null<::BlockType * > oldBlock)
MCAPI Block (ushort data, ::gsl::not_null<::BlockType * > oldBlock, ::CompoundTag serId, uint const &runId)
MCAPI_C void _playAmbientSounds (::BlockAnimateTickData const &tickData) 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 bool canConnect (::Block const &connectionBlock, uchar toOther) 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 & connectionUpdate (::BlockSource &region, ::BlockPos const &pos, ::NeighborBlockDirections neighborBlockDirections) const
MCAPI::Block const & copyState (::Block const &fromBlock, ::BlockState const &state) const
MCAPI::Block const & copyStates (::Block const &fromBlock) const
MCAPI void executeItemEvent (::ItemStackBase &item, ::std::string const &eventName, ::BlockSource &region, ::BlockPos const &pos, ::Actor *actor) const
MCAPI bool executeTrigger (::DefinitionTrigger const &trigger, ::RenderParams &params) const
MCAPI_C void forEachState (::brstd::function_ref< bool(::BlockState const &, int)> callback) const
MCAPI bool getCollisionShape (::AABB &outAABB, ::IConstBlockSource const &region, ::BlockPos const &pos, ::optional_ref<::GetCollisionShapeInterface const > entity) const
MCAPI_C::BlockType::HorizontalDirectionBits getConnectedDirections (::BlockPos const &pos, ::BlockSource &region) const
MCAPI_C::std::string getCraftingLabelText () const
MCAPI::std::string getDescriptionId () const
MCAPI_C::VoxelShapes::VoxelShape const * getOcclusionFaceShape (uchar face) const
MCAPI_C::AABB const & getOutline (::IConstBlockSource const &region, ::BlockPos const &pos, ::AABB &bufferValue) const
MCAPI_S::Vec3 getRandomOffset (::BlockPos const &pos) const
MCAPI_C bool getSecondPart (::BlockSource const &region, ::BlockPos const &pos, ::BlockPos &out) const
MCAPI::Block const & getStateFromLegacyData (ushort data) const
MCAPI bool hasState (::HashedString const &name) const
MCAPI bool hasState (::BlockState const &stateType) const
MCAPI bool hasTag (::HashedString const &tagName) const
MCAPI_C bool isCraftingBlock () const
MCAPI_C bool isInteractiveBlock () const
MCAPI bool isPartialBlock (::BlockSource const &region, ::BlockPos const &pos) const
MCAPI bool isPreservingMediumWhenPlaced (::Block const &medium) const
MCAPI bool isSolidBlockingBlockAndNotSignalSource () const
MCAPI bool isTopPartialBlock (::BlockSource const &region, ::BlockPos const &pos) 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 onStateChange (::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 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<::BlockType * > oldBlock)
MCAPI void * $ctor (ushort data, ::gsl::not_null<::BlockType * > 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 (uint legacyBlockID, ushort legacyData)
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (HashedString const &name)
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (HashedString const &name, ushort legacyData)
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (HashedString const &name, BlockStatesType const &states)
static LLNDAPI optional_ref< Block const > tryGetFromRegistry (CompoundTag const &nbt)
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 (std::string_view name, BlockStatesType const &states)
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<::BlockType * > > mBlockType
::ll::TypedStorage< 4, 8, ::CachedComponentDatamCachedComponentData
::ll::TypedStorage< 8, 96, ::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
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::IClientBlockData > > mClientData

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