
# -> Add layer
execute unless block ~ ~ ~ water run \
    return run \
        setblock ~ ~ ~ water[level=7] strict

# -> If there are blocks around then add to layer
execute unless block ~1 ~ ~ #overly_realistic:spear_can_passthrough \
    unless block ~-1 ~ ~ #overly_realistic:spear_can_passthrough \
    unless block ~ ~ ~1 #overly_realistic:spear_can_passthrough \
    unless block ~ ~ ~-1 #overly_realistic:spear_can_passthrough run \
        function overly_realistic:players/items/wooden_bucket/set_water_block/place_block_add_layer

# -> Spread water
fill ~-1 ~ ~ ~1 ~ ~ water[level=7] replace air strict
fill ~ ~ ~-1 ~ ~ ~1 water[level=7] replace air strict
