execute as @n[tag=portal.teleporting] run function portal:teleport/set_pos/get_hitbox

#tellraw @a ["Tags: ",{entity:"@s",nbt:"Tags"}]

#execute if score @s portal.normal_y matches -1000 run return run tp @n[tag=portal.teleporting] ~ ~-2 ~
#execute if score @s portal.normal_y matches 1000 run return run tp @n[tag=portal.teleporting] ~ ~ ~
#tp ^ ^ ^0.3

execute if score @s portal.normal_y matches -1000 run return run function portal:teleport/set_pos/macro/ny with storage bs:out hitbox
execute if score @s portal.normal_y matches 1000 run return run function portal:teleport/set_pos/macro/py
return run function portal:teleport/set_pos/macro/other with storage bs:out hitbox

#function portal:teleport/set_pos/_ with storage portal:hitbox the_teleported