
# -> Set gift item type
$execute on passengers run \
    loot replace entity @s contents loot overly_realistic:blocks/gifts/$(gift_type)

# -> Set display rotation
execute on passengers \
    at @s \
    facing entity @p[tag=OverlyRealistic.Player.PlacedCustomBlock,distance=..64] feet run \
        rotate @s ~ 0

# -> If gift has an item inside then set data
execute if score #or.gift_has_item OverlyRealistic.General.ArbitraryData matches 1 run \
    data modify entity @s data.gift_content_item set from storage overly_realistic:blocks gift_content_item
execute if score #or.gift_has_item OverlyRealistic.General.ArbitraryData matches 1 run \
    scoreboard players set @s OverlyRealistic.General.ArbitraryData 1
