
# -> Progress 12 : adding part 8 clay, progress 0

# -> 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",{"atlas":"minecraft:items","sprite":"minecraft:item/clay_ball"}," 1/3"]}]

# -> Update model
#summon minecraft:item_display ~ ~ ~ {interpolation_duration:5,start_interpolation:-1,teleport_duration:5,Tags:["OverlyRealistic.Block.CraftingTableSetup_Part_8","OverlyRealistic.TempEntSetup"],item: {count: 1, id: "minecraft:clay",components:{item_model:"overlyrealistic:blocks/crafting_table_setup/crafting_table_setup_part_8_progress_0"}}, transformation: {left_rotation: [0.0f, 0.0f, 0.0f, 1.0f], right_rotation: [0.0f, 0.0f, 0.0f, 1.0f], scale: [0.90432227f, 0.9375f, 0.90432227f], translation: [0.0f, 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

# -> 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
