Create items: a simple ruby and interactive sword
Items in plugins/Obsidrel/resources/items/ can combine vanilla base material, name/lore, models, attributes, mechanics, durability and inline recipes.
Basic ruby using a vanilla texture
ruby:
material: EMERALD
name: '<red><bold>Ruby</bold></red>'
lore:
- '<gray>A ruby created with Obsidrel.</gray>'
model:
path: obsidrel:item/ruby
texture: minecraft:item/emerald
item:
unbreakable: false
To supply your own image, save ruby.png in plugins/Obsidrel/pack/source/assets/obsidrel/textures/item/ruby.png and set model.texture: obsidrel:item/ruby. Resource keys omit .png.
Advanced: projectile sword with durability and crafting
This follows the actual Core sample:
ruby_sword:
material: DIAMOND_SWORD
name: '<red><bold>Ruby Sword</bold></red>'
lore:
- '<gray>Right-click to launch a ruby bolt.</gray>'
model:
path: obsidrel:item/ruby_sword
texture: minecraft:item/diamond_sword
item:
unbreakable: false
flags: [HIDE_ATTRIBUTES]
attributes:
attack-damage:
attribute: ATTACK_DAMAGE
amount: 8.0
operation: ADD_NUMBER
slot: HAND
enchantments:
sharpness: 2
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
recipes:
crafting:
type: SHAPED
amount: 1
shape: [' R ', ' R ', ' S ']
ingredients:
R: obsidrel:ruby
S: STICK
Prerequisite: obsidrel:ruby must exist for the inline crafting recipe. mechanics.ruby-bolt runs a right-click projectile with cooldown, damage and durability cost.
Link Actions and Conditions
Consumables support conditions and actions lists. ITEM_USE Triggers can invoke Actions on item events. A reusable Action may require LEVEL or PERMISSION; see the complete linked project. Keep inline mechanics distinct from standalone Triggers.
Verify
Run /obsidrel reload, test appearance, attacks, right-click, cooldown, wear, recipe and restart persistence. Rebuild and deliver the pack for changed models.
See Items fields and Recipes.