
# -> Set tags
tag @s add OverlyRealistic.Block.HardenedClayPot_HasItems
tag @s add OverlyRealistic.Block.HardenedClayPot_CanCookItems

# -> Reset heat
scoreboard players reset @s OverlyRealistic.World.Pots_Heat

# -> Create item
summon item_display ~ ~0.1 ~ {Tags:["OverlyRealistic.Block.HardenedClayPot_Item","OverlyRealistic.Block.HardenedClayPot_ItemTemp"], item: {id:"shulker_box", components:{item_model:"air"}}, transformation: {left_rotation: [0.0f, 0.7071068f, 0.7071068f, 0.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.4375f, 0.43749988f, 0.43749988f], translation: [0.0f, -0.2f, 0.0f]}}

# -> Attach item
execute align xyz run \
    ride @n[type=item_display,tag=OverlyRealistic.Block.HardenedClayPot_ItemTemp,dx=0,dy=0,dz=0] mount @s

# -> Edit item
execute on passengers \
    if entity @s[tag=OverlyRealistic.Block.HardenedClayPot_ItemTemp] run \
        function overly_realistic:general/custom_blocks/hardened_clay_pot/interaction_operations/int_place_item_edit

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

# -> Get player's cookery skill
execute store result score @s OverlyRealistic.World.Pots_UserCookingSkill run \
    scoreboard players get #or.cooking_pot_user_cookery_skill OverlyRealistic.General.ArbitraryData