一键导入
zay-es-component
Create Zay-ES EntityComponent classes for the ECS architecture. Use when creating new components, data holders, or entity attributes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create Zay-ES EntityComponent classes for the ECS architecture. Use when creating new components, data holders, or entity attributes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ArenaModule interface (api/) — arena-composition contract per ADR-0008. ModuleCatalog, ModuleLoader, and ArenaModuleSystem are live. Author new ArenaModule classes under infinity-server/src/main/java/infinity/modules/<category>/ and register them in ModuleCatalog.
Work with Subspace Infinity arena settings — the per-arena `arena.groovy` files under `zone/arenas/`, the Groovy `conf/` preset fragment library (section/shipSection/shipSections DSL), the recursive `include` directive, the `SettingsSystem` typed accessors, and the `~loadArena`/`~swapMap` commands. Use when adding or reading settings, creating a new arena, or splitting settings fragments.
Explains the api ↔ server ↔ client layering of Subspace Infinity — which module new code belongs in, how data flows between layers, which packages live in which Gradle module, and the SimEthereal + RMI boundaries. Use when deciding where a new file should live, tracing data across layers, or explaining the project structure.
Overview of Subspace Infinity project structure, tech stack, and conventions. Use when understanding the codebase, finding files, or learning project patterns.
Debug Entity-Component-System issues including EntitySet problems, memory leaks, and component queries. Use when troubleshooting ECS bugs or entity processing issues.
Create server-side game systems using SiO2 AbstractGameSystem (via the project's BaseInfinitySystem wrapper). Use when building systems that process entities, handle game logic, or manage server-side state.
| name | zay-es-component |
| description | Create Zay-ES EntityComponent classes for the ECS architecture. Use when creating new components, data holders, or entity attributes. |
Components are immutable data containers for the Entity-Component-System.
api/src/main/java/infinity/es/
From the official wiki:
ChangeTarget(target, source) + a typed *Change payload; a single canonical writer system drains those entities and applies the fold. Concrete example: EnergyChange / EnergyStatsChange records in api/src/main/java/infinity/es/ship/ are drained by EnergySystem / EnergyStatsSystem in infinity-server/src/main/java/infinity/systems/ship/. See .claude/rules/replacement-as-mutation.md and docs/adr/0001-ecs-component-model.md.com.simsilica.es.EntityComponentprivate final (immutable)toString() for debuggingBSD-3-Clause license header// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 2018-2026 Asser Fahrenholz
package infinity.es;
import com.simsilica.es.EntityComponent;
public class MyComponent implements EntityComponent {
private final int value;
private final String name;
public MyComponent() {
// Required for serialization
}
public MyComponent(final int value, final String name) {
this.value = value;
this.name = name;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
@Override
public String toString() {
return getClass().getSimpleName() + "[value=" + value + ", name=" + name + "]";
}
}
public class Player implements EntityComponent {
public Player() { }
}
public class Model implements EntityComponent {
private final String name;
public static final String SHIP = "Ship";
public static final String BULLET = "Bullet";
public static final String INVADER = "Invader";
public Model(String name) {
this.name = name;
}
public String getName() { return name; }
}
public class Decay implements EntityComponent {
private final long start;
private final long delta;
public Decay(long deltaMillis) {
this.start = System.nanoTime();
this.delta = deltaMillis * 1000000;
}
public double getPercent() {
long time = System.nanoTime();
return (double)(time - start) / delta;
}
}
public class Position implements EntityComponent {
private final Vector3f location;
public Position(Vector3f location) {
this.location = location;
}
public Vector3f getLocation() {
return location;
}
}
Gold, Bounty - integer value componentsShapeInfo - entity visual shapeFrequency - team assignmentDead - marks entity as deadWeaponType - weapon configurationDelay - time-based decay