Action / Skill Editor
Belongs to: Editor GUI · Related: Action System · Item Editor
The action editor (ActionRefsEditionGui) lets you configure triggers and handlers for an item in the GUI, without hand-writing actions.triggers. Enter it via [Action/Skill] in the item editor.
1. Interface Layout
- Trigger tabs (6 slots at the top): right-click / left-click / sneak right-click / sneak left-click / interact block / drop, etc. (configurable, source
ActionTriggerCatalog). Each tab shows the number of handlers under that trigger; left-click switches the current trigger. - Handler list (7 slots): each handler shows
#index handlerID payloadPreview.- Left-click: move up ↑
- Shift + left-click: move down ↓
- Right-click: delete
- Middle-click / Shift + right-click: edit payload
- Cooldown (slot 21): left-click +1s, right-click -1s, Shift + left-click reset. Writes
cooldownMsfor that trigger. - Add handler (slot 19): opens the handler picker.
- Bind skill (slot 20): opens the skill binding screen.
- Save (slot 49): writes back to the item.
🖼️ [Image placeholder] Action editor interface, with trigger tabs, handler list, cooldown, and add button labeled · suggested
assets/editor-actions.png
2. Add Handler Flow
[Add handler]
→ Handler picker (ActionHandlerPickerGui) lists registered handlers
→ Pick a handler
├─ If the handler registered a payload schema → open the payload form (PayloadSchemaFormGui)
│ · One slot per field, showing field name / type / current value / whether required
│ · Left-click to edit a field (chat input)
│ · STRING / INT / DOUBLE / BOOL types have different icons
│ · [Raw string] button: skip the schema and enter the raw payload directly
│ · [Confirm] validates (PayloadSchemaValidator) then writes it in
└─ If no schema → directly enter an opaque payload string via chatThe payload schema is the field structure that the developer declares for a handler; see Action Handler Development → payload schema for details.
3. Binding a QinhSkills Skill
[Bind skill] (SkillBindingGui) is the shortcut entry for "letting one item trigger cast a QS skill":
- Select a trigger tab (the same 6 as above).
- Skill list: click to select a QinhSkills skill.
- Manual input button: enter the skill ID via chat.
- JSON form button: fill the skill + level fields for
qinhskills:cast. - Clear skill: remove the
qinhskills:castfrom that trigger. - Full action link: jump to the action editor for multi-handler editing.
Binding is equivalent to adding the following to that trigger's refs:
- handler: qinhskills:cast
payload: '{"skill":"skillID","level":1}'For the skill mechanism, see Integration → QinhSkills.
4. Save and Hot Reload
After clicking save (slot 49), ActionRefsEditorService.saveBinding() writes the action table into the actions section of the item YAML and triggers an action table hot reload (ActionTableRegistry.reload()), so changes take effect immediately.
5. Correspondence with Hand-written YAML
What you configure in the GUI is exactly the actions.triggers from the Action System:
- Trigger tab ↔
actions.triggers.<name> - Handler list ↔
refs: [{handler, payload}] - Cooldown ↔
cooldown
When the GUI doesn't support all the details of conditions / consume / sequence, you can switch back to hand-written YAML to supplement (the two are interchangeable).
Next Steps
- Action System: underlying concepts
- Handlers: handlers and payload
- Action Handler Development: custom handlers + schema