execute as @a[tag=boatsisun] on vehicle store result score @s bs.x1 run data get entity @s Pos[0] 1000 execute as @a[tag=boatsisun] on vehicle store result score @s bs.y1 run data get entity @s Pos[1] 1000 execute as @a[tag=boatsisun] on vehicle store result score @s bs.z1 run data get entity @s Pos[2] 1000 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.x1 -= @s bs.x2 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.y1 -= @s bs.y2 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.z1 -= @s bs.z2 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.x1 *= @s bs.x1 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.y1 *= @s bs.y1 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.z1 *= @s bs.z1 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.x1 /= #1000 bs.c execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.y1 /= #1000 bs.c execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.z1 /= #1000 bs.c execute as @a[tag=boatsisun] on vehicle store result score @s bs.x2 run data get entity @s Pos[0] 1000 execute as @a[tag=boatsisun] on vehicle store result score @s bs.y2 run data get entity @s Pos[1] 1000 execute as @a[tag=boatsisun] on vehicle store result score @s bs.z2 run data get entity @s Pos[2] 1000 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.r = @s bs.x1 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.r += @s bs.y1 execute as @a[tag=boatsisun] on vehicle run scoreboard players operation @s bs.r += @s bs.z1 execute as @a[tag=boatsisun] on vehicle run tellraw @a[limit=1,sort=nearest,tag=boatsisun] {"score":{objective:"bs.r",name:"@s"}}