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

# -> Particles
particle dust{color:[1.000,0.722,0.651],scale:2} ~0.5 ~1.1 ~0.5 0.25 0.1 0.25 0.01 8 normal @a

# -> Sound
playsound minecraft:block.slime_block.hit block @a ~0.5 ~1 ~0.5 0.7 2
playsound minecraft:block.azalea.hit block @a ~0.5 ~1 ~0.5 1 2

# -> If seed progress <= 5 then return and do progress_0
execute if score @s OverlyRealistic.Player.ItemProgress_FishScraps matches ..10 run \
    return fail

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

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

# -> Particles
particle dust{color:[1.000,0.722,0.651],scale:2} ~0.5 ~1.1 ~0.5 0.25 0.1 0.25 0.01 10 normal @a

# -> Sound
playsound minecraft:block.slime_block.hit block @a ~0.5 ~1 ~0.5 0.7 2
playsound minecraft:block.azalea.hit block @a ~0.5 ~1 ~0.5 1 2

# -> Create crop addition marker
execute positioned ~0.5 ~1.5 ~0.5 \
    summon marker run \
        function overly_realistic:players/items/crop_additions/fish_scraps/create_crop_addition

# -> 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~{IsCropAddition:true, crop_addition_type: "fish_scraps"}] 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
