Skip to main content

Module components

Module components 

Source
Expand description

Component types and marker trait for the Entity Component System.

These types define the data model for all game entities. They live in basalt-api so that plugin crates can reference them through the basalt-api facade without depending on the ECS storage engine.

Structs§

BlockPosition
Absolute block coordinates (integers).
BoundingBox
AABB hitbox dimensions.
ChunkPosition
Chunk coordinates (X and Z only, no Y).
CraftingGrid
Tracks the contents of a player’s crafting grid.
DroppedItem
A dropped item on the ground.
EntityKind
Minecraft entity type ID.
Health
Hit points for damageable entities.
Inventory
Player inventory — 36 slots (27 main + 9 hotbar).
KnownRecipes
Set of recipes a player has unlocked, plus the protocol’s numeric display_id mapping.
Lifetime
Auto-despawn countdown.
OpenContainer
Tracks that a player currently has a non-inventory window open.
PickupDelay
Pickup delay before a dropped item can be collected.
PlayerRef
Links an entity to a player connection.
Position
World position of an entity.
Rotation
Facing direction of an entity.
Sneaking
Marker component for sneaking state.
Velocity
Movement vector per tick.
VirtualContainerSlots
Holds the slot contents of a virtual container window.

Enums§

Phase
Execution phase within a game loop tick.

Traits§

Component
Marker trait for component types stored in the ECS.

Type Aliases§

EntityId
A unique entity identifier.