Entity Definition Dashboard
Goals
- Manage gameplay entities (models, attributes, drop tables) from the Control Center without touching Mongo manually.
- Provide a typed persistence layer that validates ObjectId references to base items and item models.
- Ensure auditability via editor audit logging and permission-gated access.
Scope
Backend
- Introduce
EntityDefinitioncollection with uniquekey, model metadata, arbitrary property bag and structured drop definitions. - Expose REST endpoints (
GET/POST/PATCH/DELETE /api/entities) with validation against item and item-model collections. - Register editor page access entries and new permission nodes (
editor:entities.*).
Frontend
- Add
Entitiesnavigation entry with overview table, search and counts. - Implement create/edit form with sections for metadata, primary model, variants, properties and drops.
- Reuse dashboard stores to prefetch base items and item models for selection inputs.
- Separates umfangreiches Modell-Handling auf eine eigene Seite (
/entities/:id/models) inklusive Blockbench-Upload und Variantenpflege. - Schnell-Upload auf
/entity-modelserlaubt Blockbench.bbmodel-Dateien direkt einer Entity zuzuweisen ohne den Detail-Editor zu öffnen. - Entity-Model-Vorschau liefert Hitbox-Toggles, Animationsliste und Playback auf Basis der Blockbench-Keyframes, damit Rigs ohne externe Tools geprüft werden können.
Data Model
EntityDefinition:key,name,category,description,tags,properties (Map<String, any>).model: optional primaryEntityModelConfig(variant key, display name, resource keys, optional item model reference, numeric dimensions, optionalgeometryData+geometrySourcefrom Blockbench uploads).variants: zero or moreEntityModelConfigentries for alternate states (each may override geometry via Blockbench uploads).drops: list ofEntityDropDefinitiondescribingitemId,chance (0-1), quantity range, roll type and JSON conditions.
API Surface
GET /api/entities→ list definitions.GET /api/entities/{id|key}→ fetch by ObjectId or key.POST /api/entities→ create, requireseditor:entities.write.PATCH /api/entities/{id}→ replace payload, requireseditor:entities.edit.DELETE /api/entities/{id}→ remove definition, requireseditor:entities.delete.
Permissions & Page Access
- New editor page key
entitieswith read/create/edit/delete actions mapped to the respective permission nodes. - Page guard ties
/api/entitiesroutes to the new page definition so dashboard auth gating applies automatically.
Rollout & Verification
- Gradle
:server:buildto ensure new Java sources compile. npm run buildto verify Vue routes and TypeScript store work as intended.- Smoke test: create entity with sample model and drop, ensure list reflects the entry and backend persists values.
Follow-ups / Open Questions
- Add metadata editors for variant/model
metadatamap if needed by runtime systems. - Integrate property suggestions once gameplay services publish schemas.
- Consider JSON schema validation for
conditionsonce drop consumer is finalized.