Chunk pregeneration utility

I’ve been looking for something, anything with the capability to pregenerate chunks in Sponge 1.8.9, but so far I have failed. I’m surprised if something like this doesn’t already exist, but if it doesn’t, it really ought to be made!

Tl;dr Need a tool for pregenerating a world’s chunks.

I have been informed that the functionality is there (Thanks VcSaJen!):

Yet I’m not aware if anyone’s actually made use of it. Anyone at all wanna give it a whirl?

I made a small plugin to pre generate chunks, using the world border api. This means that the command will create a task that will generate all the chunks within the world border over an amount of time.

The main command is:
/chunkpregen <start|stop> [<world>]
The world is optional and will default to the command executor, the console must specify the world.

And the start command allows the following flags:
--tickInterval <ticks> ~ Sets the interval between generation runs. (Default: 10)
--chunksPerTick <chunkCount> ~ Sets maximum number of chunks per tick to generate. (Default: Disabled)
--tickPercentLimit <tickPercent> ~ Sets the limit of tick time that can be used to generate chunks as a percentage of the preferred tick interval. (Default: 0.15)
--log ~ Logs info to the console, like the progress.

Example:
/chunkpregen start world --tickInterval 1 --chunksPerTick 100 --log

The flag names are exact as the method names in the link you posted, so you can check there for more info what they will exactly do.

Download: here
And if anyone is interested in the source code: here

Good luck :wink:

3 Likes

Hey there! Thanks a million for the help!

I gave it a whirl and it seems to work to an extent. I did the entire pregeneration and mapping via console, but the result was something like this: http://imgur.com/mzcFlDb

As you can see, the trees, cacti etc. are completely missing … until I actually visit the area, which is when the rest of the stuff is generated, which kind of ruins the point of the entire mod. I am using Realistic Terrain Generator mod for the worldgen. I did find another solution (GitHub - gecgooden/chunkgen: Mod to pre-generate chunks - Thanks to Lover for pointing it out), which does a similar pregeneration, but this one also generates the RTG specific terrain, trees etc. I unfortunately don’t know Java, but it might be wortwhile to compare what it does differently to achieve this.

No problem, and that the terrain isn’t populated is probably a bug in the sponge implementation.

EDIT: I opened a issue for this: https://github.com/SpongePowered/SpongeCommon/issues/611

1 Like

It looks to me that the problem here is the difference between world generation and block populators. You’ve managed to run the world generation, which takes care of all the base stuff, but block populators are only run when a player ‘requests’ the chunk, this may be a bug in the ChunkPreGenerate, but it could also be purposeful.

Indeed, if you look here:

there isn’t any logic to run block populators. (may be a bug, may be purposeful)

1 Like

Yes, I have also found the issue and explained the cause in the link of my previous post :wink:

EDIT. Seems like they already resolved the issue, so you should try the latest sponge build.

@Cybermaxke How about releasing this plugin in plugin releases catagory?

I’ve been doing a test with the latest edition of SpongeForge (1225) and with the chunk pregen - It does now generate the trees etc. in a somewhat interesting manner according to the Dynmap: http://imgur.com/B0Sro90

Teleporting to the area itself, however, shows that the missing bits either are there or are generated upon arrival (http://imgur.com/VBN07Ty). I shall have to test by loading the map up in a Spigot server and seeing what happens without the RTG generator present and will be back with the results later

Alright, so according to my testing, it would seem that the area with generation between the stripes seems fine, but some bits of the map still don’t generate other than the ground, and these areas default to the vanilla decoration upon switch to Spigot. I appreciate all the help so far and will keep testing to try and figure this out.

@PsychoLynx Ah ok, then I will try to work around the issue for now by modifying the ChunkPreGenerate and adding it to the plugin until the problem is resolved.

@RandomByte Yes, I will do that but I would like to resolve this issue before posing the plugin. :wink:

1 Like

@Cybermaxke Have you updated the download link with the ChunkPreGenerate work around?

@KumaGetsu @PsychoLynx
Could you try this version and see if its working? You can download it here.

Sorry man, no such luck. http://imgur.com/6llSNxO

(Using Sponge 1229, Pregenutil snapshot and neweset version of RTG for 1.8.9 as well as Dynmap). Luckily enough, I managed to fix my modded world gen problem using RTGs 1.9 version and a vanilla command block method of generating.

Alright, so apparently Sponge was updated to fix a bug with the pregen stuff, so if people are interested, they could try pregenning the world using this now and see what happens :slight_smile: