Creating Zay-ES Components
Components are immutable data containers for the Entity-Component-System.
Location
api/src/main/java/infinity/es/
Official Zay-ES Rules of Thumb
From the official wiki:
- Components are data only - no logic in components
- One canonical writer per component type. Multiple systems must not independently write the same component to the same entity. When multiple sources contribute deltas (e.g. damage from different weapons, prize-pickup cap bumps), use the ADR 0001 Change-entity shape: emitters create a short-lived entity carrying
ChangeTarget(target, source)+ a typed*Changepayload; a single canonical writer system drains those entities and applies the fold. Concrete example:EnergyChange/EnergyStatsChangerecords inapi/src/main/java/infinity/es/ship/are drained byEnergySystem/EnergyStatsSystemininfinity-server/src/main/java/infinity/systems/ship/. See