
# -> If basket is heated then return
execute if score @s OverlyRealistic.World.BasketBoilTime matches 1.. run \
    return fail

# -> If basket is not shut then return
execute unless function overly_realistic:general/custom_blocks/basket/basket_is_shut run \
    return fail

# -> Add to fermentation time
scoreboard players add @s[tag=!OverlyRealistic.Block.Basket_Status_HasFermentedSweetBerryBase] OverlyRealistic.World.BasketSweetBerryFermentationTime 1

# -> Advancement
execute if entity @s[tag=!OverlyRealistic.Block.Basket_Status_HasFermentedSweetBerryBase] run \
    advancement grant @p[distance=..3,limit=10] only overly_realistic:advancements/stone_age/almost_alchemy

# -> If fermentation isn't maximized then return
execute unless score @s OverlyRealistic.World.BasketSweetBerryFermentationTime matches 3000.. run \
    return fail

# -> If fermentation has already happened then return
execute if entity @s[tag=OverlyRealistic.Block.Basket_Status_HasFermentedSweetBerryBase] run \
    return fail

# -> Reset fermentation value
scoreboard players set @s OverlyRealistic.World.BasketSweetBerryFermentationTime 3000

# -> Change additional display
data modify entity @n[type=block_display,tag=OverlyRealistic.Block.Basket_Display_SweetBerryBase,distance=..0.5] block_state set value {Name:"purple_concrete_powder"}

# -> Tag ent
tag @s add OverlyRealistic.Block.Basket_Status_HasFermentedSweetBerryBase