Jump to content

[1.8] Need help with Custom World Generation


Recommended Posts



I am currently trying to create a new world type, based on the old idea of an flat earth. Basically I want to have 3-4 huge continents in the center, then a large ocean (1k from continents) and finally huge waterfalls that end in the void.

(Sort of like http://www.daysleeper.co.uk/work/flat_earth.jpg, just bigger and with more continents)


Too achieve this I created my own WorldType, ChunkProvider and WorldChunkManager. Easy.

Then I quickly got a basic noise generator running, that generates the heightmap for me. I am still not quite sure how I am going to remove the remaining continents that are to close to the end of the world (I like that, it sounds dramatic :D), but thats not so important right now.


Inspired by what some other mods are doing, I tried to add it to my ChunkProvider.

(cause thats should be the last place where everything is done, using stuff that was generated by the GenLayer)

In provideChunk() I have:




        for(int j=0;j<16;j++){
            for(int k=0;k<16;k++){
            	int posX=cx*16+j;
            	int posZ=cz*16+k;
            	double d =3;
			try {
				d = (OpenSimplexNoiseTest.getHeight(this.worldObj.getSeed(), posX, posZ)*100);
			} catch (IOException e) {
				// TODO Auto-generated catch block
            	Long L = Math.round(d);
            	int height = Integer.valueOf(L.intValue())-9;
            	for(int posY=0; posY<256;posY++){
            		if(posY<height){		//There is no block
            			if(height<63){		//ocean
                       		chunkPrimer.setBlockState(posX, posY, posZ, Blocks.water.getDefaultState());
            			} else {
                       		chunkPrimer.setBlockState(posX, posY, posZ, Blocks.air.getDefaultState());
            		} else {
                   		chunkPrimer.setBlockState(posX, posY, posZ, Blocks.stone.getDefaultState());



based on the vanilla code.


But I am not sure if this is working, because the initializeAllBiomeGenerators() function in the GenLayer class looks like its generating terrain too, and not only biomes.

Islands are created --> zoom in (islands are now continents) -->more islands -->...--> rivers --> smooth --> done

As far as I understand everything my code should pretty much disable everything in GenLayer, but yeah, I still have the normal vanilla generation.


And even if that's not the problem, it looks like at least the biomes are overriding my terrain height (e.g.: mountains). Is there any way to avoid this, or to combine the biome height with mine, while keeping everything as compatible with other mods as just possible?



I would really appreciate it if someone could help me to understand things a little bit better. It has been quite some time until I used this stuff the last time.

Anways, thx for taking the time and reading all this.

Have a nice day!



Here could be your advertisement!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.