How can I teleport to an unloaded entity?
I am using invisible invulnerable ArmorStands to create "warps" and "homes" in a map. The idea is that I can spawn them in with a specific name, and then teleport a player back to them like this:
/tp @p @e[name=PlayerHome,type=ArmorStand]
These warps/homes need to be able to be moved, so I cannot just use static coordinates.
The ArmorStand method was working fine at first, however I have noticed that if the entity is not within spawn chunks or a radius of the player, I cannot teleport or interact with it in any way.
Is there any way I can teleport to a far-away entity? Or have it become loaded first?
I was thinking of doing something with /spreadplayers, which loads chunks that entities are spread to, but I cannot get it to target the unloaded ArmorStand.
Best Answer
You can always just use this command if your server is in 1.14:
/forceload add < 1stchunk > < 2ndchunk >
just as if you were using /fill, put the xz of the first chunk location in the < 1stchunk >, and put the xz of the second chunk in the < 2ndchunk >. This will cause the specified chunks to always be loaded. Just be warned that this wont work if your server involves laggy things such as redstone, as if redstone is loaded in the lot, it will get very laggy.
Pictures about "How can I teleport to an unloaded entity?"



How do you teleport to a specific entity?
Players who want to move mobs to their character's position or move their character to the mob's position can use the following commands:How do you teleport facing an entity in Minecraft?
/tp is no longer different from /teleport now, and became an alias of /teleport . Added facing to /teleport , which causes the target entity to face an entity or a location. /teleport has been simplified a bit and players can now teleport to entities in other dimensions.How do you use a command block to teleport an entity?
Type this command in when having the command block GUI open /teleport @p <x> <y> <z> . Then, activate the command block with redstone (including buttons, levers, and pressure plates), and they will be sent to their destination. The player can set up multiple different teleports.How do you find entity in Minecraft?
The @e selector finds entities of any type. The c= argument selects a certain count. If this number is positive, it will select these in order from closest to furthest. c=1 will select the nearest entity.Quick Tip: How To Teleport YOURSELF To A Named/Tagged Entity
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ylanite Koppens, Ylanite Koppens, Kristina Paukshtite, Dazzle Jam
