
# -> Remove items if possible
execute if score @s OverlyRealistic.World.BlockItemAmount matches 1.. run \
    function overly_realistic:general/custom_blocks/preparation_plate/preparation_plate_remove_items_from_interaction

# -> Tag preparation plate
tag @s add OverlyRealistic.Block.PreparationPlateHasSpecialItem
tag @s add OverlyRealistic.Block.PreparationPlateHasStrippedLog

# -> Add stripped log
function overly_realistic:general/custom_blocks/preparation_plate/interactions/create_displayed_item/stripped_log/create_stripped_log

# -> Remove player's item
execute on target run \
    item modify entity @s[gamemode=!creative] weapon.mainhand overly_realistic:multipurpose/remove_one_item

# -> Sound
playsound block.leaf_litter.step block @a ~ ~ ~ 0.5 1
