Development
A concise contributor map of the ECS systems, components, and configuration.
ECS architecture
| Class | Role | Responsibility |
|---|---|---|
ElevatorSystem | Orchestrator | Detects input, validates the current elevator block, searches vertically, checks destination safety, and queues travel/effects. |
ElevatorComponent | Per-player state | Stores last successful use plus short failed-search timestamps per direction. |
SmoothingComponent | Travel state | Stores start/end positions, elapsed time, duration, and captured rotation. |
SmoothingSystem | Travel runner | Moves players with TransformComponent#setPosition() and applies one final Teleport correction. |
ElevatorConfig | Configuration | Defines BuilderCodec-backed search distance, cooldown, sound, smooth movement, and duration keys. |
Safety rules
- Use
CommandBufferfor ECS mutations during ticks. - Check
world.getChunkIfLoaded()beforeworld.getBlockType(). - Resolve the teleport sound lazily only when sound is enabled and travel succeeds.
- Do not smooth by adding
Teleportevery tick.