
# -> Reset score
scoreboard players reset @s OverlyRealistic.Player.UsedAllaySpawn

# -> Reset adv trigger
advancement revoke @s only overly_realistic:items/place_custom_block

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

# -> Operate on marker
execute as @n[type=marker,tag=OverlyRealistic.Block.IsCustomBlockMarker,distance=..64] at @s \
    align xyz \
    positioned ~0.5 ~0.5 ~0.5 run \
        function overly_realistic:general/custom_blocks/general/place_custom_block_from_marker with entity @s data

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