
# -> Progress 7 : adding part 5 wall, progress 0

# -> If player does not have the right materials then return
execute unless items entity 00000001-0000-002b-0000-00010000002b contents #planks run \
    return fail

# -> Add to progress
scoreboard players add @s OverlyRealistic.General.ArbitraryData 1

# -> Set success
scoreboard players set #or.item_success OverlyRealistic.General.ArbitraryData 1

# -> Sound
playsound block.wood.place block @a ~ ~ ~ 0.6 1

# -> Update text
execute on passengers \
    if entity @s[type=text_display,tag=OverlyRealistic.Block.CraftingTableSetup_Text] run \
        data modify entity @s text set value [{"sprite":"minecraft:block/crafting_table_front","extra":["\n",{"sprite":"minecraft:block/oak_planks"}," 7/10"]}]

# -> Update model
summon minecraft:item_display ~ ~ ~ {Tags:["OverlyRealistic.Block.CraftingTableSetup_Part_5","OverlyRealistic.TempEntSetup"],item: {count: 1, id: "minecraft:oak_pressure_plate",components:{item_model:"overlyrealistic:blocks/crafting_table_setup/crafting_table_setup_part_5_progress_0"}}, transformation: {left_rotation: [-0.5f, -0.5f, -0.5f, 0.5f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.9999693f, 0.99996734f, 0.9999679f], translation: [0.01f, 0.5f, 0.0f]}}
ride @n[type=item_display,tag=OverlyRealistic.TempEntSetup,distance=..1] mount @s
execute on passengers run \
    tag @s remove OverlyRealistic.TempEntSetup
