In Minecraft Java Edition 1.12.2 I created my own End Portal in creative, right by the spawn point. After I was done in the End I used the kill command so I'd respawn back in the Overworld, but to my dismay, my spawn point was right over the portal I created. I'd essentially re-spawn in the End. How can I get back to the Overworld now? I already have several mods (which are not related to the issue in any way), so if I have to add a mod to do it, that's fine, but I need to keep my End dimension intact. Since it's creative I do of course have cheats enabled, so commands are an option as well.
since I learned some more about commands, this is the easier way:
/execute in minecraft:overworld run tp @s 0 80 0
This will teleport you somewhere near to the world spawn in the Overworld. Afterwards, just set your spawn using a bed, or using
Old, more convoluted answer below:
There's no way to set spawn in a different dimension than the one you're in, so
/spawnpoint will set your spawn in the End - no good. Since the End portal transports you to your spawn, which is in the End, that's no go. You can't light a Nether portal in the End, but you can still spawn one.
/setblock ~ ~ ~ minecraft:nether_portal and you'll be transported to a Nether portal in the Nether. Then use the portal in the Nether and it will transport you to the overworld. Then use
/spawnpoint @s ~ ~ ~ or just a bed to set your spawn in the overworld. Next time you go to the End place any block next to the single Nether portal block you've spawned to update and in effect destroy it.
You can set your spawn somewhere else with commands. Use
/setworldspawn to set your spawn point or the world spawn point, respectively.
/spawnpoint @s <x> <y> <z> sets your own spawnpoint, as if you've slept in a bed.
/setworldspawn <x> <y> <z> sets the world spawn, affecting all players.
I fixed it using a mod I already had installed, FTB Utilities. I used its command
/edit NBT player [username]
and edited my spawn point in there. It's easier than the other answers, but since it relies on mods I will be accepting one of the other ones. But if you have the mod installed already, this is the best solution.