
# -> Reset success
scoreboard players set #or.clay_mold_shape_success OverlyRealistic.General.ArbitraryData 0

# -> Set mold type
$function overly_realistic:general/custom_blocks/clay_mold/clay_mold_recipe/$(square_0)$(square_1)$(square_2)$(square_3)$(square_4)$(square_5)$(square_6)$(square_7)$(square_8)

# -> If the mold type wasn't successful then return
execute if score #or.clay_mold_shape_success OverlyRealistic.General.ArbitraryData matches 0 run \
    return fail

# -> Tag as molded
tag @s add OverlyRealistic.Block.ClayMold_HasBeenMolded

# -> Sound
playsound block.gravel.break block @a ~ ~ ~ 0.5 1.2

# -> Particles
particle block{block_state:"clay"} ~ ~ ~ 0.1 0.1 0.1 0.1 10 normal @a

# -> Set as fireable
tag @s add OverlyRealistic.Block.Block_CanBeFired
