
# -> If block is not in air then return and break
execute unless block ~ ~ ~ #air run \
    return run \
        function overly_realistic:general/custom_blocks/tanning_rack/tanning_rack_break_from_place with entity @s data

# -> Sound
playsound block.wood.place block @a ~ ~ ~ 0.45 1

# -> Rotate perm marker
execute rotated as @p[tag=OverlyRealistic.Player.TempPlayer] run \
    rotate 00000001-0000-002a-0000-00010000002a ~ ~

# -> Get rotation
execute store result score #or.global OverlyRealistic.General.ArbitraryData run \
    data get entity 00000001-0000-002a-0000-00010000002a Rotation[0]

# -> Set rotation data
function overly_realistic:general/custom_blocks/tanning_rack/place_tanning_rack_from_rotation

# -> Remove marker
kill @s
