Files
Serenity-Deco/data/serenitydeco/function/destroy_deco.mcfunction
2026-04-08 13:39:58 +01:00

12 lines
487 B
MCFunction

# Summon item back
$loot spawn ~ ~ ~ loot serenitydeco:$(deco_id)
summon item ~ ~ ~ {Item:{id:"minecraft:armor_stand",count:1},Motion:[0,0.2,0]}
# Effects
particle cloud ~ ~.5 ~ 0.2 0.2 0.2 .3 20
playsound minecraft:entity.player.attack.crit block @a ~ ~ ~ 1 1
# Kill triggerbox, deco origin and all of its children (all related deco model entities)
kill @n[type=interaction,tag=serenitydeco_triggerbox,distance=..2,nbt={attack:{}}]
execute on passengers run kill @s
kill @s