Component registration
Component package structure​
Each component lives in its own package under component/:
component/<name>/
├── <Name>.java # Main component class (extends AComponent / AArmorStandComponent / ATextDisplayComponent)
├── inventory/ # Optional: GUI menus specific to this component
│ └── <Name>Inventory.java
└── listener/ # Optional: event listeners specific to this component
└── <Name>EventsListener.java
Reference implementation: component/lasersender/ (LaserSender + inventory + listener).
Component base classes​
AArmorStandComponent— armor-stand-based components.ATextDisplayComponent— TextDisplay-entity-based components.
Both extend AComponent, which implements the IComponent interface.
Component interfaces​
| Interface | Purpose |
|---|---|
IColorableComponent | Can change color |
IRotatableComponent | 3D rotation (pitch/yaw/roll) |
IDetectionComponent | Activated by conditions (min/max thresholds) |
ILightComponent | Has a light level property |
IPlayerModifiableComponent | Player-editable in-game |
IMirrorContainer | Contains mirrors (extends IColorableComponent) |
IActivableComponent | Has an on/off state |
IAreaComponent | Defines min/max area |
IMaterialComponent | Configurable block material |
ITaskComponent | Has periodic update logic (in common/task/) |
Five-file registration checklist​
A new component under component/<name>/ must be wired into all five of:
common/items/ComponentType.java— add a new enum value.component/mapper/ComponentMapper.java— addtoEntity()andfromEntity()branches.area/ComponentFactory.java— add creation logic.component/common/inventory/ComponentMenuInventory.java— add the component's menu content (rotations, color, options).component/common/inventory/ComponentShortcutBarInventory.java— add the component's shortcut bar content (editor hotbar buttons).
Forgetting any of the five breaks the component registration silently — the menu / hotbar / persistence layer that was skipped will just not see the new component.
Wiki update​
When a new component is added, also create its wiki page under wiki/In-game/Features/Components/<component-name>.md and update wiki/_sidebar.md. See Wiki update matrix for the full mapping.