
# -> Add to seed progress
scoreboard players add @s OverlyRealistic.Player.SeedProgress_PumpkinSeeds 1
scoreboard players add @s[scores={OverlyRealistic.Player.WisdomStats.Husbandry=1..}] OverlyRealistic.Player.SeedProgress_PumpkinSeeds 1
scoreboard players add @s[scores={OverlyRealistic.Player.WisdomStats.Husbandry=2..}] OverlyRealistic.Player.SeedProgress_PumpkinSeeds 1
scoreboard players add @s[scores={OverlyRealistic.Player.WisdomStats.Husbandry=3..}] OverlyRealistic.Player.SeedProgress_PumpkinSeeds 1

# -> If seed progress <= 5 then return and do progress_0
execute if score @s OverlyRealistic.Player.SeedProgress_PumpkinSeeds matches ..5 run \
    return run \
        function overly_realistic:players/items/seeds/pumpkin_seeds/progress_0

# -> Particles
particle item{item:"pumpkin_seeds"} ~0.5 ~1.3 ~0.5 0.25 0.1 0.25 0.01 8 normal @a

# -> Sound
playsound item.crop.plant block @a ~0.5 ~1 ~0.5 0.7 1

# -> If seed progress <= 10 then return
execute if score @s OverlyRealistic.Player.SeedProgress_PumpkinSeeds matches ..10 run \
    return fail

# -> Reset values
scoreboard players reset @s OverlyRealistic.Player.SeedProgress_PumpkinSeeds

# -> Add to farmer experience
function overly_realistic:players/wisdom/husbandry/add_to_skill_xp_c_plant_crop_10

# -> Set block
setblock ~ ~1 ~ pumpkin_stem

# -> Advancement
advancement grant @s only overly_realistic:advancements/stone_age/neolithic

# -> If player is in creative then return
execute if entity @s[gamemode=creative] run \
    return fail

# -> Remove item
execute if items entity @s weapon.mainhand *[custom_data~{IsSeed:true, seed_type: "pumpkin_seeds"}] run \
    return run item modify entity @s weapon.mainhand overly_realistic:multipurpose/remove_one_item
item modify entity @s weapon.offhand overly_realistic:multipurpose/remove_one_item
