Module block

Module block 

Source

Macros§

_blocks_properties_prop
blocks_properties
def_enum_serializable
impl_enum_serializable

Structs§

ArrayEnumProperty
An enum block property, the difference with EnumProperty is that it uses a const generic to store values directly inside the structure.
Block
A basic block defined by a name, its states and properties. This block structure is made especially for static definition, its states are computed lazily and almost all method requires a self reference with static lifetime.
BlockMap
A map structure that maps blocks (defined statically) to a value.
BlockSet
A set structure that store blocks.
BlockState
Represent a particular state of a block, this block state also know all its neighbors by their properties and values.
BlockStaticMap
BlockStaticSet
BoolProperty
A boolean block property.
EnumProperty
An enum block property, this property use an external statically defined array of values.
GlobalBlocks
This is a global blocks palette, it is used in chunk storage to store block states. It allows you to register individual blocks in it as well as static blocks arrays defined using the macro blocks!.
IntProperty
An unsigned 8-bits integer block property.
RangeProperty
An unsigned 8-bits integer block property with offset for first value.

Enums§

BlockSpec
Made for static definitions of all properties of a block.

Constants§

MAX_STATES_COUNT
The maximum number of states for a single block.

Traits§

Property
Trait for all properties stored in a block state.
PropertySerializable
All valid property values types must implement this trait.
UntypedProperty
An untyped property trait used for storage in shared property.

Type Aliases§

BlockKey
The type of hashable value that can represent a block as a map key. See Block::get_key, its only usable for statically defined blocks.
BlockStateKey