Expand description
A tiny specific Entity Component System (ECS) for Minecraft entity ecosystem.
Structs§
- Default
Entity Codec - A useful structure that implements the method
EntityCodec::default
and add to the given builder theDefault:default()
value of the generic typeT
. Actually,EntityCodec
is only implemented when your typeT
isDefault + Component
. This bound cannot be defined in the structure definition for now because it would not be possible to define it statically. - Entity
Type - A type for static definition of entity types.
- Global
Entities - The global entities palette used in level environment.
- Null
Entity Codec - A null codec, this codec make nothing and can be used as a temporary placeholder.
Traits§
- Entity
Codec - This trait describes a specific way of encoding, decoding and building a default variant of a component structure for an entity. This trait should usually be implemented for each component of an entity, however because it doesn’t provide any type restriction you can encode, decode and add whatever default value you want.
- Entity
Component - A trait to implement to component structures that support a codec, this is used by
entities!
macro in order to reduce boilerplate. - Single
Entity Codec - This trait is a simpler specification of
EntityCodec
with the restriction of allowing only one component (implementinghecs::Component
) to be encoded or decoded. The component type also have to implementDefault
to provide a defaultEntityCodec::default
implementation.