
# -> Particles
execute align xyz run \
    particle splash ~0.5 ~0.5 ~0.5 0.25 0.25 0.25 0.1 5 normal @a

# -> Sound
execute at @s run \
    playsound item.bucket.fill block @a ~ ~ ~ 0.5

# -> Set block
setblock ~ ~ ~ air

# -> If block is in an ocean biome then set as sea water
execute if biome ~ ~ ~ #is_ocean run \
    return run \
        function overly_realistic:players/items/iron_bucket/empty/contents_block/specialized/water_is_sea_water

# -> Set contents type
scoreboard players set #or.iron_bucket_acquire_contents_type OverlyRealistic.General.ArbitraryData 1

# -> Replace item in hand
execute if items entity @s weapon.mainhand *[custom_data~{or_bucket_specific:"iron_bucket",or_bucket_contents:"empty"}] run \
    return run \
        loot replace entity @s weapon.mainhand loot overly_realistic:items/iron_bucket_dirty_water
loot replace entity @s weapon.offhand loot overly_realistic:items/iron_bucket_dirty_water
