Craft a Teleport Altar
Make a Teleport Pearl
Teleport Back Pearl
Put(right click on item frame) ender pearl onto altar to get the pearl,
By using it, you can teleport back to the altar you get the pearl, even if the alart and you are in different dimension.
Teleport Back Pearl (egg item base)
Unpgrade the "Teleport Back Pearl" with a cake, you will get it,
You can use it to teleport back to the altar , so does nearby creatures.
Random Teleport Pearl
Put ender eye onto altar to get,
By using it, you can teleport to random altar in the same dimesion.
Random Teleport Pearl (snawball item base)
Unpgrade the "Random Teleport Pearl" with a cake, you will get it,
you can use it to teleport to random player in same dimesion.
Install
Download this into datapacks/ folder in your world, then/reload
Make sure this datapack is enabled.
/datapack list
For Server
Because the chunck with altar is fourceloaded, so if there are so many altars (e.g. 20) in your world, it will will be laggy.
Uninstall/execute as @e[type=armor_stand,tag=tp_altar] at @s run setblock ~ ~ ~ air replace
above command destory all teleport altar, and remove all chunk with altar from fourceloaded chuncks.
then disable or remove this datapack