
# -> Reset adv trigger
advancement revoke @s only overly_realistic:items/seeds/use_pumpkin_seed

# -> Add to value
scoreboard players add @s OverlyRealistic.Player.UseSeed_PumpkinSeeds 1

# -> Unless UseSeed >= 20 then return
execute unless score @s OverlyRealistic.Player.UseSeed_PumpkinSeeds matches 20.. run \
    return fail

# -> Reset value
scoreboard players reset @s OverlyRealistic.Player.UseSeed_PumpkinSeeds

# -> Set raycast range
scoreboard players reset @s OverlyRealistic.Player.LocalRayRange
execute store result score @s OverlyRealistic.Player.LocalRayRangeMax run \
    attribute @s block_interaction_range get 10

# -> Raycast to farmland
execute anchored eyes \
    positioned ^ ^ ^ \
    anchored feet run \
        function overly_realistic:players/items/seeds/pumpkin_seeds/raycast_travel