HHGames/data/herohost/function/tnt/explosion.mcfunction
HeroChris cb08afef4c Redesign biome and update
- Updates to 1.21.3
- Biome changes with correct colours
2024-11-19 18:07:59 +01:00

18 lines
856 B
Mcfunction

# --- HeroGames - Copyright (c) HeroHost team (code provided by HeroChris). ---
# effects
execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] run playsound minecraft:entity.generic.explode record @a ~ ~ ~ 1 1 1
execute as @a[nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] run particle minecraft:explosion ~ ~1 ~ 0 0 0 1 2 normal
# reset player
execute in herohost:world run tp @a[tag=!hc.debug,nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] ~ ~ ~
clear @a[tag=!hc.debug,nbt={Inventory:[{Slot:103b,id:"minecraft:tnt"}]}] minecraft:tnt
# start explosion timer
execute store result storage hc.tnt tt_timer int 1 run random value 25..35
$schedule function herohost:tnt/explosion $(tt_timer)s
# tag next
schedule function herohost:tnt/schedule/tag 3s
summon minecraft:block_display 5 101 -245 {block_state:{Name:"minecraft:scaffolding"}}