Jump to content

Adjust size of custom biome?


Mazetar
 Share

Recommended Posts

Simple answer: There is none, sorry.

Complex-ish answer:

I'll try to give you a rundown of how the Lowlevel worldgen works. Basically There is a long chain of "GenLayer" instances which all generate part of the terrain. It starts with a simple thing that generates landmasses ("islands"). Those get magnified (they are just dots at the beginning) and their edges get smoothed out (all separate GenLayer subclasses which are "stacked" onto each other.

Biomes are one of these substeps, but not the last one. The first biome-gen is also just a few dots which get maginfied and smoothed out again. After those come tweaks: Joining rivers together, hills, sand on the shore, etc. etc.

You can look at it yourself in GenLayer.initializeAllBiomeGenerators.

That is called from WorldChunkManager, which spits out an event for you to modify the resulting GenLayers (WorldTypeEvent.InitBiomeGens). You would need to go up the chain basically, until you get to the biome generator and then replace that with your own version, which also takes your small biome into consideration.

 

Warning: This is a rough idea. I haven't tested this in any way and I'm not sure if it even works. Notch's worldgen code is the result of some crazy, intelligent mind and being obfuscated makes it not any more easy to understand... :D

try this

 

 

this.setMinMaxHeight(0.1F, 0.1F);

Ummm... Nope. That's height, not size.
Link to comment
Share on other sites

just a thought, not sure if its possible.  What if you generate your oasis like a structure would spawn or a ravine.  The only question then is it possible to set the x/z coordinates biome id/name in this process.  I've read over the generation and chunk provider code a million times still trying to figure it out and learn what it all does, but i could be wrong but i could have sworn I saw a way to set the biome id to the specified coordinates..

Link to comment
Share on other sites

There's no way to change it after?

 

That would only make it be a specific biome per definition (things that only spawn in that biome can spawn there etc.) but the terrain is already generated so it won't look like the other biome.

 

If I change Ocean biome to desert, it will still be deep sea water every where and little to no sand and no cacti :P But the F3 screen will correctly display current biome as "desert"

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

There's no way to change it after?

 

That would only make it be a specific biome per definition (things that only spawn in that biome can spawn there etc.) but the terrain is already generated so it won't look like the other biome.

 

If I change Ocean biome to desert, it will still be deep sea water every where and little to no sand and no cacti :P But the F3 screen will correctly display current biome as "desert"

 

Right, that's why I suggested spawning the biome in a similar way that the ravines and caves are generated.  Say he wants to spawn his oasis in the desert, he created a MapGenOasis file that would generate say a circularish area with grass and trees or what have you, and in that method set that areas biome name

Link to comment
Share on other sites

Okay so I decided to play around with this, and I figured I'd better start by learning wtf these things really look like.

So I started by commenting out everything except this line inside of initializeAllBiomeGenerators:

GenLayerIsland genlayerisland = new GenLayerIsland(1L);

And made the return be an array of 3 like it used to, but only passing the genlayerisland for all 3.

 

I guess I should add the zoom as well, but I assume that is stretching it.

I will be adding more and more to see how it changes.

 

I see there are many layers and much stuff going on here, I guess I should see if I can remove the water and the other stuff as well so I can see how it looks like before all that is added as well :)

Heres how it looks like with only genlayerisland:

http://snag.gy/eV3Ew.jpg

 

After adding the fuzzyZoom it looked like this (same seed):

http://snag.gy/H1MFy.jpg

 

 

This is interesting although I feel I'm starting to high up.

I assume I need to go remove some other methods to prevent the water level from raising and stuff.

This is quite interesting to play around with indeed :)

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Right, that's why I suggested spawning the biome in a similar way that the ravines and caves are generated.  Say he wants to spawn his oasis in the desert, he created a MapGenOasis file that would generate say a circularish area with grass and trees or what have you, and in that method set that areas biome name

 

That sounds like a much simpler idea, I will look into how MapGen files work as well.

I'm a total beginner at worldgen and I must admit that all the files look quite nasty and scary to me with obfuscated names and a lot of numbers being calculated. I'll start looking into MapGenRavine and see if I can figure out how it works :)

 

 

If you guys dont get it.. then well ya.. try harder...

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

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