How I ported my multi-world server from CanaryMod to Sponge

I’ve been wracking my brain trying to find a clear way to explain this, but to be honest, it was just ugly and I’m sorry, it may not translate over well. Also, there may be a better way, or different way, or some files I copied that don’t need to be done… But I had very little to go on and this is what I came up with. Hope it helps some people.

To start with, our world on CanaryMod looked like this:
(overworld) Default World BriarCraft Tutorial: new player spawn point
- (end) Server Hub: hub connecting all other world hubs via world warps
- (nether) Not Used

(overworld) Osprey: survival map
- (end) Osprey linked end
- (nether) Osprey linked nether

(overworld) Skyland: survival plots
-(end) Not Used
-(nether) Skyland linked nether

And a few other minigame worlds and creative plots… but you get the idea from this.

And this is what our world translated to in SpongeForge:
(overworld) Default World BriarCraft Tutorial: new player spawn point (now called DIM0)
- (end) Server Hub: hub connecting all other world hubs via world warps (now called DIM1)
- (nether) Not Used, but can’t be removed (called DIM-1)
* NOTE: the two dimensions above are associated to the default world and all vanilla portals go to these worlds
- (overworld) Osprey: survival map (called level 2)
- (end) Osprey standalone end (called level 3)
- (nether) Osprey standalone nether (called level 4)
- (overworld) Skyland: survival plots (called level 5)
-(nether) Skyland standalone nether (called level 6)

So basically, as Sponge refers to it, I now have 1 world with unlimited dimensions. Only with the strangeness surrounding vanilla portals. Existing ones that I ported over all take players to DIM1 or DIM-1 and return portals all link back to the default world. Trying to build new portals in any world except DIM0, DIM1 and DIM-1 don’t even activate.

Now the messy part, here’s what I had to do to set this up. I was not able to just manually rebuild and copy and paste the correct files into the new directories because Sponge required it’s own level.dat file to be created for each world/dimension in order to recognize it. So first I started a new server and let it build it’s default directory and worlds. I then added Core plugin to the “mod” folder in the server directory because it already provided the ability to do a /world create which I used to create a new instance for every dimension I wanted to port over. (Except my default overworld, nether, and end because those were already created by default.) At this point I shut down the server and got to work moving and renaming files in the world and config files.

Config was easy, most of the work was done when you created the worlds using the Core Plugin. The only thing you need to do (if you want to) is rename DIM 1 (default end) and DIM -1 (default nether) to whatever name you have for your default end and nether. NOTE: you can’t rename DIM 0 in the config… it will just recreate itself.

The world directory is where most of the real work begins. Start by changing the name of the world folder to whatever the name of your default world is. Now drag over any data files relevant to your default world into that main folder: data, level.dat, scoreboards, playerdata, region, session.lock, stats, other?? Accept any request to over-write files. The only files we care about keeping at this point are the level_sponge.dat files, forced chunks.dat and the dimension/world folders for your newly created worlds. Now, open each of the world/dimension folders and do the same for each directory. Don’t forget to duplicate playerdata and stats if you care about them and rename DIM 1 (default end) and DIM -1 (default nether) if you did so in the config directory.

Here’s what I ended up with…

Now restart the server and if everything was done correctly and worked, you should see something like this in your server log:
44:17] [Server thread/INFO]: Preparing level “briarcraft”
[20:44:18] [Server thread/INFO]: Preparing start region for level 5
[20:44:19] [Server thread/INFO]: Preparing spawn area: 80%
[20:44:19] [Server thread/INFO]: Preparing start region for level 4
[20:44:19] [Server thread/INFO]: Preparing start region for level 3
[20:44:20] [Server thread/INFO]: Preparing start region for level 2
[20:44:21] [Server thread/INFO]: Preparing spawn area: 68%
[20:44:21] [Server thread/INFO]: Preparing start region for level -1
[20:44:22] [Server thread/INFO]: Preparing start region for level 1
[20:44:22] [Server thread/INFO]: Preparing start region for level 0

Now use the commands in Core to do /tpworld to visit all your worlds and see if it worked. Warning, you may have to fly to your old spawns and reset them.

2 Likes

Nice! Thanks for the write-up. I didn’t think to create dummy world folders to just reuse the dimension IDs with my ported world chunks.

@Nutmegan

We’ll be adding Cauldron’s migrator to bring in the worlds back under the level-name world folder. Thanks for the writeup and feedback…we’ll definitely be making this easier in the future.

4 Likes

Thanks for the heads up. I assumed it was only a matter of time before there was a cleaner process, but it’s still comforting to hear there’s a plan. I wouldn’t want to be repeating this process when we finally get ready to port over our live server. But for now, it gets us something to build and start testing on.