OBSIDREL / DOCS

Documentation

Guides, tutorials and technical references for the Obsidrel ecosystem.

DocumentationConnect events to reusable actions

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:

yaml
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

  1. Verify the target resource ID.
  2. Confirm the referenced action exists.
  3. Ensure the event and item-trigger names are valid for your Core version.
  4. Inspect logs after reload.
  5. 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.

Was this article helpful?Loading ratings…

Help us improve Obsidrel documentation. One vote per account and article. Discord AI feedback can also contribute when the answer cites this article.