Class endstone::BlockType¶
ClassList > endstone > BlockType
Inherits the following classes: endstone::Registry::Type
Public Types inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| typedef Identifier< T > | Id |
Public Static Attributes¶
| Type | Name |
|---|---|
| constexpr auto | Air = BlockTypeId::minecraft("air") |
Public Functions¶
| Type | Name |
|---|---|
| virtual std::unique_ptr< BlockData > | createBlockData () const = 0 Creates a new BlockData instance for this block type, with all properties initialized to unspecified defaults. |
| virtual bool | hasItemType () const = 0 Returns true if this BlockType has a correspondingItemType . |
Public Functions inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| virtual Id | getId () const = 0 Return the identifier of this object. |
| virtual std::string | getTranslationKey () const = 0 Get the translation key, suitable for use in a translation component. |
| operator Id () const |
|
| bool | operator!= (const Id & other) const |
| bool | operator!= (const T & other) const |
| bool | operator== (const Id & other) const |
| bool | operator== (const T & other) const |
| virtual | ~Type () = default |
Public Static Functions inherited from endstone::Registry::Type¶
| Type | Name |
|---|---|
| const T * | get (Id id) Look up a registry entry by identifier. |
Public Static Attributes Documentation¶
variable Air¶
Public Functions Documentation¶
function createBlockData¶
Creates a new BlockData instance for this block type, with all properties initialized to unspecified defaults.
Returns:
new data instance
function hasItemType¶
Returns true if this BlockType has a correspondingItemType .
Returns:
true if there is a corresponding ItemType, otherwise false
The documentation for this class was generated from the following file include/endstone/block/block_type.h