
# -> Progress 14 : setting part 8 clay, progress 2

# -> If player does not have the right materials then return
execute unless items entity 00000001-0000-002b-0000-00010000002b contents clay_ball 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.gravel.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"}," 0/1"]}]

# -> Update model
#execute on passengers \
    if entity @s[type=item_display,tag=OverlyRealistic.Block.CraftingTableSetup_Part_8] run \
        data modify entity @s item.components."minecraft:item_model" set value "overlyrealistic:blocks/crafting_table_setup/crafting_table_setup_part_8_progress_2"
#execute on passengers \
    if entity @s[type=item_display,tag=OverlyRealistic.Block.CraftingTableSetup_Part_8] run \
        data modify entity @s transformation set value {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.9301299f, 0.9642543f, 0.93012977f], translation: [0.0f, 0.51426905f, 0.0f]}

# -> Particles
execute align xyz run \
    particle block_crumble{block_state:"clay"} ~0.5 ~0.5 ~0.5 0.3 0.3 0.3 0.01 25 normal @a
