Locate Entity Outside Loaded Chunks (Constant Pos)
I've been developing a mapmaking tool that allows players in creative to turn armor stands into teleporters. Using the
linking_toolon an armor stand puts the armor stand intolinkingmode. This mounts an ownedender_pearlentity to the armor stand to keep its chunk loaded. When you use the linking tool on another armor stand, it searches to see if an armor stand exists that's already in linking mode and has an ender pearl riding it that's owned by the same player. If it finds one, the two of them copy each others' UUIDs and both entertpmode. When a player walks into an armor stand intpmode, it teleports the player to the linked armor stand. This is meant to mimic the tiles in the 2D Pokemon games that bring the player elsewhere, such as doors, cave openings, and ladders. The problem comes when the exit teleporter is in an unloaded chunk, as it can't be located by UUID. I don't want to constantly have all chunks loaded that have teleporters in them. I tried forceloading the chunk ahead of the teleport, but it seems the exit still can't be located that quickly after the chunk has been loaded. I'm considering teleporting the player to the exit's coordinates instead, but I'd prefer the teleport to fail altogether if the exit no longer exists. Is there another way to locate the exit in the moment of trying to teleport the player? I don't want to constantly chunk load the exit.