
# -> Tag player
tag @s add OverlyRealistic.Player.TempPlayer

# -> Operate on hit racks
execute as @e[type=interaction,tag=OverlyRealistic.Block.TanningRack,distance=..64,nbt={attack:{}}] at @s \
    align xyz \
    positioned ~0.5 ~0.5 ~0.5 run \
        function overly_realistic:general/custom_blocks/tanning_rack/tanning_rack_broken_by_player

# -> Untag player
tag @s remove OverlyRealistic.Player.TempPlayer
