
# -> Debug particles
#particle happy_villager ~ ~ ~ 0 0 0 0.0001 1 force @a

# -> Set block
setblock ~ ~ ~ powder_snow

# -> Sound
playsound block.powder_snow.place block @a ~ ~ ~ 0.5 1

# -> If player is in creative then return
execute if entity @s[gamemode=creative] run \
    return fail

# -> Replace water bucket
execute if items entity @s weapon.mainhand *[custom_data~{or_bucket_specific:"iron_bucket",or_bucket_contents_type:"powder_snow"}] run \
    return run \
        loot replace entity @s weapon.mainhand loot overly_realistic:items/iron_bucket_empty
loot replace entity @s weapon.mainhand loot overly_realistic:items/iron_bucket_empty
