Connect events to reusable actions
Defining an action under resources/actions/ does not execute it automatically. A trigger connects a supported event to the corresponding action.
The Core Showcase includes a trigger similar to:
showcase_katana_hit:
enabled: true
event: ITEM_USE
target: obsidrel:showcase_obsidian_katana
item-trigger: HIT
cancel-event: false
actions: [showcase_katana_hit_fx]
It reacts when the matching custom item emits a supported HIT item-use event. Another Showcase trigger uses BLOCK_BREAK.
If nothing runs
- Verify the
targetresource ID. - Confirm the referenced action exists.
- Ensure the event and item-trigger names are valid for your Core version.
- Inspect logs after reload.
- Test one event at a time.
These are event-driven examples; they do not imply a global repeating scan.
Applying this in your project
The samples start disabled. Enable only one trigger, confirm its target ID and action ID, and test the event. For BLOCK_BREAK loot, distinguish ADDITIVE from REPLACE.
Back up before modifying production. Run /obsidrel reload, inspect warnings and test in game. Rebuild the resource pack for model or texture changes.
See the field reference for documented sample options.