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

# -> Get lay figure ID
scoreboard players operation @s OverlyRealistic.World.LayFigure_ID = #or.lay_figure_id_globalized OverlyRealistic.General.ArbitraryData

# -> If player is shifting then drop items
execute if score @s OverlyRealistic.PredicateValue.IsSneaking matches 1 run \
    return run \
        scoreboard players set #or.lay_figure_interaction_type OverlyRealistic.General.ArbitraryData 1

# -> If lay figure has no on-going recipe, then open menu
execute if score #or.lay_figure_has_recipe_ongoing OverlyRealistic.General.ArbitraryData matches 0 run \
    return run \
        function overly_realistic:general/custom_blocks/lay_figure/interactions/open_menu_no_recipe

# -> Store item
item replace entity 00000001-0000-002b-0000-00010000002b contents from entity @s weapon.mainhand overly_realistic:items/set_1_count
