
# -> Operate on players
execute as @a[tag=!OverlyRealistic.Player.IsDeity] at @s run \
    function overly_realistic:general/main_loops/main_loop_100t_operate

# -> If it is raining then do rain operations
execute if predicate overly_realistic:world/weather/is_raining_thundering \
    if predicate overly_realistic:world/weather/rain_operate_rng \
    at @p[sort=random] run \
        function overly_realistic:general/weather/randomized_weather_operate

# -> If it is raining then attempt to fill baskets up with water
execute if predicate overly_realistic:world/weather/is_raining_thundering \
    as @e[type=interaction,tag=OverlyRealistic.Block.Basket,x=0] \
    if predicate overly_realistic:world/weather/basket_fill_from_rain_rng \
    at @s \
    if predicate overly_realistic:global/can_see_sky \
    if function overly_realistic:mobs_general/sky_check/is_exposed_to_sky_top_block run \
        function overly_realistic:general/custom_blocks/basket/basket_fill_with_water_from_rain

# -> Function tag
function #overly_realistic:general_loops/main_100t

# -> Loop (5 sec)
schedule function overly_realistic:general/main_loops/main_loop_100t 100t