/function place
# place.mcfunction
execute positioned 1000000 0 0 run function load_async
schedule function on_loaded 2
# on_loaded.mcfunction
setblock 1000000 0 0 minecraft:stone
# Passenger must be `LivingEntity` | |
summon minecraft:armor_stand 8.0 0.0 8.0 {Tags: ["vehicle"], Passengers: [{id: "minecraft:armor_stand", Tags: ["passenger"]}]} | |
# Move passenger to the current world position | |
execute as @e[x=7.5, y=-0.5, z=7.5, dx=0.0, tag=passenger] run function move_passenger | |
# Eject passenger | |
kill @e[x=7.5, y=-0.5, z=7.5, dx=0.0, tag=vehicle] |
kill @s | |
# Center the current entity within chunk | |
execute positioned ~-8.0 0.0 ~-8.0 positioned ~72057594067927952.0 0.0 ~72057594067927952.0 positioned ~-72057594067927952.0 0.0 ~-72057594067927952.0 run teleport @s ~8.0 0.0 ~8.0 |