
# -> Particles
particle splash ~ ~ ~ 0.3 0.1 0.35 0.1 10 normal @a

# -> Sound
execute if score @s OverlyRealistic.General.ArbitraryData matches 1 run playsound weather.rain player @a ~ ~ ~ 0.5 2
execute if score @s OverlyRealistic.General.ArbitraryData matches 5 run playsound weather.rain player @a ~ ~ ~ 0.5 2
execute if score @s OverlyRealistic.General.ArbitraryData matches 10 run playsound weather.rain player @a ~ ~ ~ 0.5 2
execute if score @s OverlyRealistic.General.ArbitraryData matches 15 run playsound weather.rain player @a ~ ~ ~ 0.5 2

# -> Add to confirmation
scoreboard players set #or.water_existence OverlyRealistic.General.ArbitraryData 1

# -> Add to timer
scoreboard players add @s OverlyRealistic.General.ArbitraryData 1

# -> If timer < max then return
execute unless score @s OverlyRealistic.General.ArbitraryData matches 20.. run \
    return fail

# -> Sound
playsound weather.rain player @a ~ ~ ~ 0.5 2

# -> If block is not applicable then return
execute unless block ~ ~ ~ #overly_realistic:spear_can_passthrough run \
    return run \
        kill @s

# -> Place water
setblock ~ ~ ~ water[level=0] destroy

# -> Remove marker
kill @s
