execute if predicate items:in_inventory/item_type/shard if entity @s[tag=!shards_dont_break] run function items_py:shard_break/break

# order matters (first passive, then others) for shards_dont_break tag (used in crystal sword)
execute if predicate items:in_inventory/item_type/armor run function items:armor/player_took_dmg
execute if predicate items:in_inventory/item_type/weapon run function items:weapon/player_took_dmg
execute if predicate items:in_inventory/item_type/passive run function items:passive/player_took_dmg

advancement revoke @s only items:player_took_dmg
