
# --> Interaction checks

# -> If player is shifting then return and do recipe operations
execute if score @s OverlyRealistic.PredicateValue.IsSneaking matches 1 \
    as @n[type=interaction,tag=OverlyRealistic.Block.ClayMoldInteractedWith,distance=..16] at @s run \
        return run \
            function overly_realistic:general/custom_blocks/clay_mold/set_mold_type with entity @s data.mold_shape_dialog

# -> Get clay mold ID
scoreboard players operation @s OverlyRealistic.Player.UseItem_ClayMold = #or.clay_mold_id OverlyRealistic.General.ArbitraryData

# -> Reset current clay mold values
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_0 = #or.clay_mold_shape_square_0 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_1 = #or.clay_mold_shape_square_1 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_2 = #or.clay_mold_shape_square_2 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_3 = #or.clay_mold_shape_square_3 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_4 = #or.clay_mold_shape_square_4 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_5 = #or.clay_mold_shape_square_5 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_6 = #or.clay_mold_shape_square_6 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_7 = #or.clay_mold_shape_square_7 OverlyRealistic.General.ArbitraryData
scoreboard players operation @s OverlyRealistic.World.ClayMoldSquare_8 = #or.clay_mold_shape_square_8 OverlyRealistic.General.ArbitraryData

# -> Create UI
function overly_realistic:general/custom_blocks/clay_mold/clay_mold_interactions/show_clay_mold_ui with storage overly_realistic:clay_molds dialog_clay_mold_shape
