Skip to Content
⚠ Under Construction
ReferenceC++ APIBlockData

endstone::BlockData

Represents the data related to a live block.

Functions:

NameDescription
getBlockStatesGets the block states, which when passed into a method such as Server::createBlockData(type, block_states) will unambiguously recreate this instance.
getRuntimeIdGet the runtime ID for this block.
getTypeGet the block type represented by this block data.

getBlockStates

BlockStates getBlockStates() const

Gets the block states, which when passed into a method such as Server::createBlockData(type, block_states) will unambiguously recreate this instance.

Returns:

the block states for this block

getRuntimeId

std::uint32_t getRuntimeId() const

Get the runtime ID for this block.

Returns:

the runtime id for this block

getType

std::string getType() const

Get the block type represented by this block data.

Returns:

the block type

Last updated on