Item durability, attributes and mechanics
The Core example contains a sword with attributes, durability and a right-click projectile mechanic. These are separate sections; begin with a working item before enabling all of them.
ruby_sword:
material: DIAMOND_SWORD
name: '<red>Ruby Sword</red>'
model:
path: obsidrel:item/ruby_sword
texture: minecraft:item/diamond_sword
durability:
enabled: true
max: 1200
show-bar: true
mechanics:
ruby-bolt:
type: PROJECTILE
trigger: RIGHT_CLICK
cooldown: 2s
durability-cost: 1
cancel-event: true
projectile: SNOWBALL
velocity: 1.6
damage: 4.0
fire-ticks: 0
The original example also defines attributes.attack-damage, attributes.attack-speed, enchantments and item flags. Copy those options from the version-matched Showcase when you need them.
Test safely: trigger the ability once, observe cooldown and durability, and inspect the console for definition errors. Resource pack changes still require a rebuild.
Adapt this to your server
Test durability and attack attributes separately, then enable the RIGHT_CLICK projectile. Observe cooldown, durability consumption and event cancellation after each use.
Safe editing: back up the YAML, change one field at a time, run /obsidrel reload, check the console and verify actual gameplay. If you changed the model, build and distribute the pack.
All documented field paths and sample values are explained in field reference.