A plugin that divides a very large world into smaller parts

Basically, I want to either create a plugin or work with an existing one to do this. Here is what I want to happen: A player walks to the edge of a world, and when they get to a certain coordinate, it transports them to the corresponding coordinate in the next world. It will look and feel like a continuation of the world, just with a short loading period in-between.

I want to do this for many different reasons, but if someone has a better idea, just let me know! Also, let me know if this would even be possible and if there is a plugin that already exists to do this (I have not found one) or if there is a plugin that I could modify to do this.

Thanks for the help!

~JDHallows

Unless I’m missing something I don’t really see the reason to do this.

So to the player it’s just the same world? Then there’s no point splitting it into smaller parts.

In a way Minecraft already does this, because a world is divided into ‘chunks’ (16x256x16) and chunks are joined together to create a continuous world

1 Like

For example? If we understood your motivation better, you might get better results.

You want to tear apart an existing world into smaller worlds? Or do you want to generate new worlds as the player explores the environment and generate the terrain as if it was generated in one world with one seed? Both would be equally difficult (or easy) to accomplish. But in either way, the player would see a lot of the void, unless you teleport the player way before he’s able to even see the “edge”.

In the first example you could simply copy the chunks to the new world and delete them from the old world, while preventing the chunks to regenerate in the old world.

In the second example you would create the same world over and over again and let the terrain generate naturally, with the exception of the specific chunks of the world the player is not supposed to see.

1 Like

I image he wants to do this for performance reasons. However i’ll make an educated guess and say that this won’t end up well… Just imagine a Minecart or redstone circuits passing these borders.

If different worlds were multithreaded (afaik they currently aren’t) then this would make sense. However i don’t believe it’s that easy to accomplish.

1 Like

Or cut off structures. It’s definitely a flawed concept. But maybe it’s good enough for some players.

Yes, I mainly want to do this for performance reasons. The way I plan to set the world up, I will not have to worry about redstone or structures being affected, especially since I am creating it in world painter. I also want to do this to give me more flexibility in making different regions of the world do different things. The world itself if about 400,000 by 400,000 blocks, in total. My world painter can not even create a world that large, which is part of the reason why I began to consider doing this.

So, while I believe it would be possible, would I see a noticeable difference in performance? Especially since each world will have quite a few entities in it. I know entities can cause a lot of lag, but I want there to be a lot of them in this world. Also, there will be quite a few Ender Dragons flying around, and having one or two in each individual world, rather than a dozen in the same world, seemed a better option. However, I am not extremely knowledgeable on what would or could cause performance issues in Minecraft.

And as I mentioned earlier, being able to modify the way each region of the world works by dividing it into smaller minecraft worlds is of a great benefit to me, although I do not necessarily need this feature.

Edit: Also, I plan to disable redstone usage in this world, so that would probably make a difference in performance.

In order to accomplish this you would need to rewrite the entirety of the minecraft world system.

It would likely break everything.

I suspect an increase in file read/write-operations. I don’t think that the distribution of entities between worlds matters much, if at all.

It definitely is possible even though it will have flaws. The biggest problem I see is how to answer all the questions related to the border of each world.

Since I am creating the world, and the coordinates would likely never change, couldn’t I just make it automagically teleport somebody to the corresponding coordinate? Like:

Player steps on coordinate X1,Y1,Z1 on World 1
Transports them to coordinate X2,Y2,Z2 on World 2

Once I created one coordinate like this, could I not use it as a reference and base the rest off of it? Like, if the player is 2 more blocks on the x-plane, then transport them 2 more blocks on the x-plane in the next world?

Edit: I could then do this for each border, since the borders will be straight lines, not curved. I plan to divide it into a grid of sorts.

What part of “You will need to rewrite a huge chunk of Minecraft” isn’t getting through here?

I assumed that it would be as easy as the Multiverse plugin, just a little different since the portals would be individual coordinates instead.

However, if you’re saying that this would mean having to rewrite a lot of the minecraft code, and would break more than fix anything, then I will have to find another solution for what I want to do.

Edit: Meaning I will probably leave it as one world, and find a different way to achieve my goals.

You could do it, but as worlds arn’t always loaded, and that they are already chunked, and with “entity Activation range”, I predict that you would be putting a lot of stress on the system for little or negative performance benefit.

This would be an entirely different story if you were teleporting people cross server, using Bungeecord or similar, as then things would be running on different chunks, but then you have to deal with people seeing people across the boundaries, syncing damage up etc. It would turn into a total nightmare.

Shotbow Network have done it with a few caveats, like being unable to swap regions whilst in combat, but they too were spanning it over multiple server instances, not just multiple worlds.

Edit:

, and find a different way to achieve my goals.

What are your goals? so far you have only asked whether it’s possible to do this whole world splitting thing.

What are your goals? so far you have only asked whether it’s possible to do this whole world splitting thing.

The main reason why I asked was because I wanted to know if it was possible, and if so how easy it would be to do it. If it was going to be easy to do, and would have benefits, I planned on doing it. However, the answer thus far is that it would be too difficult to implement and I would not see any noticeable difference and it could actually cause worse performance.

As you said, if I planned on putting these ‘regions’ on different servers, it would have a greater benefit since Bungeecord could balance the load. And while down the line this could still be an option, I think that right now my best choice is to just create one large world.

One way that I may have to do this is by stitching the worlds together. My world painter struggles with creating the world, since it is so large (400,000 x 400,000). So I have been looking into being able to stitch smaller parts of it together. However, while I have not looked very thoroughly into this process, it does seem rather difficult, but possible.

My ‘goals’ were to modify the server plugins for each region, so that they each behaved differently. For example, I planned to modify some of the entities in the game, so being able to use a sheep as a sheep in one region, but being able to make it something else in another region was appealing. (Animals would not be able to cross regions) However, this is honestly not that big of a deal breaker, and I can still work within the bounds of minecraft for the server. (I considered a modded client, but plugins just seem so much easier)

Again, my ‘goals’ were not deal breakers, just I was thinking about them with the idea of dividing the world into different regions. Now, I will just have to do the same thing while working with one large world instead. It should not be too difficult, since there are plenty of other servers who manage to do this.

Thank you to everyone for your help and comments, I really do appreciate it! I got the answer I needed, and I am grateful for everyone’s time.

As long as you are writing the plugin yourself, I can’t see any reason why you can’t still have the sheep acting differently in each region on a single world, it would be slightly harder to manage (but not much) then splitting it by world.

That said, if you really do want to make it so that your regions are different worlds, you can do that too, it just seems counter to performance. If all you want is to teleport people to the next world when they reach a border, that’s pretty easy to do, you wouldn’t need to rewrite minecraft at all. People are probably confusing it with the idea of making it seem seamless to the client, or trying to make it span servers.

By far the hardest thing, would be making the world and keeping their borders in sync, but if you don’t care about that (you can’t edit cross-region / adventure mode) it would be trivial. It’s the tiny edge cases like this that make it seem hard, but if near enough is good enough you are fine.

You could even use the vanilla world border feature, so that people can see the barriers as they approach the edge of each world.

I don’t see an easy way around your world painter issue however, unless you make each world an island in an ocean or something, you are going to have to stitch it all together, and if world painter can’t support that, you are going to have to do post-processing / merging in something like mcedit.

But you are going to have similar issues, if you keep it as one big world, or cut it again afterwards into smaller worlds (noting that you would likely need to merge it all anyway, so it’s likely easier to merge it into 1 big world, and then split it into smaller worlds if you really want to split the regions by worlds)

It’s a big task, but not nearly “minecraft rewriting” or “hard” just rather tedious in my eyes.

Quick note, If you need someone to generate a huge world…

I have an i7-5930K and 32GB of RAM…

And like very little to use it on…

I could just do it for you…

I can give you FTP access for the world files, the only thing is that my internet isn’t particularly fast.

If you’re interested feel free to message me.

1 Like

There is a plugin that does essentially what you described. It is called CA-teleport. It comes packaged with a Minecraft map called Crafting Azeroth http://www.minecraftforum.net/forums/show-your-creation/screenshots/1595918-crafting-azeroth . The big difference is it is used to teleport between altitude layers as apposed to world boundaries. An early version did both as the map was broken up between worlds. An additional feature is that the layers over lap 64 blocks and the plugin syncs up block placement, so one can see the same block changes from one layer to the next. Now the plugin is proprietary to the map it comes with and is not configurable when it come to boundary placement, but the author has given perms to tinker with the code CA-Teleport/plugin.yml at master ¡ rakama/CA-Teleport ¡ GitHub , and if the code is not useful at the very least it is a proof of concept. One more thing, the plugin does not teleport vehicles,i.e. mine cart, boat, horse. I have found this to be a hindrance. Just something to consider if you decide to rework this plugin.