
# -> Progress 6 : setting part 4 wall, progress 1

# -> 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"}," 6/10"]}]

# -> Update model
execute on passengers \
    if entity @s[type=item_display,tag=OverlyRealistic.Block.CraftingTableSetup_Part_4] run \
        data modify entity @s item.components."minecraft:item_model" set value "overlyrealistic:blocks/crafting_table_setup/crafting_table_setup_part_4_progress_1"
