I'm making a working Tardis in Minecraft using datapack dimensions. Part of that is the ability to send the Tardis exterior anywhere in the world (And eventually in the Nether and End too). The
/spreadplayers command works great for moving the armour stand that summons the exterior, but only in the spawn chunks.
I've found that when I send the stand more than 500 blocks away from spawn it goes into unloaded chunks, where Minecraft commands can't track it.
I had also found the
/forceload command, which would be a way to get the exterior to work, however to get the exact chunk loaded, I assume I need
/execute at @e[tag=dw.TARDIS.location run forceload ~ ~
The problem seems to be a catch 22. If I send the armour stand far away (Which I want to do, because the whole point of a Tardis is to explore distant places, not to move around within eyesight) then I need to force load the chunk before the stand can arrive. To force load the chunk I need the armour stand to already be there.
I just added new way to work out the new location, where 2 armour stands are moved around 0,0, their x and z cords are saved to a scoreboard, then individually multiplied and divided through 3 prime numbers, both x values are then added together, multiplied and divided again and then I do the same with the z values. The end result is fairly large positive and negative random numbers.
Is it possible to use these numbers with a
/forceload command to load the chunk before moving the armour stand, is there another way of doing it without the command, or even some way to get Minecraft to keep track of a specific armour stand outside of loaded chunks? Any help would be appreciated.