
# -> Add to CutLog
scoreboard players add @s OverlyRealistic.World.PreparationPlateCutLog 3

# -> Tool-dependent additions to CutLog value
execute if items entity 00000001-0000-002b-0000-00010000002b contents #overly_realistic:prep_plate_log_cut_tool_0 run \
    scoreboard players add @s OverlyRealistic.World.PreparationPlateCutLog 3
execute if items entity 00000001-0000-002b-0000-00010000002b contents #overly_realistic:prep_plate_log_cut_tool_1 run \
    scoreboard players add @s OverlyRealistic.World.PreparationPlateCutLog 5

# -> Sound
playsound block.wood.break block @a ~ ~ ~ 0.6 1.3

# -> Particle
particle item{item:"stick"} ~ ~ ~ 0.25 0.1 0.25 0.001 5 normal @a

# -> Clamp value
scoreboard players set @s[scores={OverlyRealistic.World.PreparationPlateCutLog=101..}] OverlyRealistic.World.PreparationPlateCutLog 100

# -> Globalize value
scoreboard players operation #or.preparation_plate_stripped_log_cut OverlyRealistic.General.ArbitraryData = @s OverlyRealistic.World.PreparationPlateCutLog

# -> Show player progress
execute on target run \
    function overly_realistic:general/custom_blocks/preparation_plate/interactions/int_cut_stripped_log_subtitle

# -> If CutLog < max then return
execute unless score @s OverlyRealistic.World.PreparationPlateCutLog matches 100.. run \
    return fail

# -> Reset CutLog
scoreboard players reset @s OverlyRealistic.World.PreparationPlateCutLog

# -> Cut log
function overly_realistic:general/custom_blocks/preparation_plate/interactions/int_remove_all_items_cut_log
