Jump to content

Recommended Posts

Posted

Hello everybody!

Today, i met some problems with world generation:

For my custom world type, here's what i'm trying to do:

-Remove default rivers gen.

-Remove default lakes gen.

-Make so that in chunk, only some biomes can generate (Ex: i want so in chunk (15, 2) only biomes {coldTaiga, desert} can generate. And leave choice of which one exactly and where to generator).

-Control average height (and height variations) of chunk  (Ex: making average height of chunk with plains of 90, will make plains that are on height 92 (instead of 62))

(-"Manually fill oceans". But if 2 above are possible, then what is left is in oceanic biomes replace all air blocks from surface up to 62 with water.)

And here's what i could and could not do:

-I managed to remove rivers with custom GenLayers generator by removing gen layers responsible for rivers.

-I can't find where lakes are generated.

-I know that GenLayerBiomes is responsible for biomes, but i can't get chuk position from there (checked with printing to console arguments of getInts method of custom GenLayerBiomes).

-I also cannot find place where chunk height is calculated/generated.

Here are my classes related to world gen (gist messed up their order): https://gist.github.com/elix-x/4d28c4813c4064f82e00

To do what i want to, should i try to do this with gen layers, or should i try to use something else?

 

Thanks for help!

If you have any questions - just ask!

Posted

Now, i'm successfully overwriting heights and height variations.

I also can, conrtol which biomes are generated at location, by groups (Ocean, Mushroom island, Hot, Warm, Cool, Cold). But that's not precisely enough for me.

I'm guessing that lakes are generated in either BiomeGenBase.genTerrainBlocks or in IChunkProvider.populate. But still haven't found exactly...

Also, i think that oceans are filled in BiomeGenBase.genTerrainBlocks. So there's no easy way to ovewrite that easily... Or is there?

 

I'm still open to suggestions and help!

 

Posted

Alright, now i'm completely overriding water generation (lakes and oceans). Who knew, that apart from water being generated in decorator, all air blocks below y = 63 are automatically replaced with water while generating world? That's how oceans are filled with water. And swamps have small layer of it....

The only thing left is to be take higher control for biomes to generate in chunks.

 

Code on gist is as always updated.

Posted

Thanks elix for keeping this topic up to date. I too made a mod doing the basic same thing you wanted just Oct 9th 2015. Not released or published as I haven't picked a license yet. Hate that part. It was a few lines of code. I just modified the all the biome's min and max heights to 0.0 except for hell, end, and extreme hills biomes.  The side effects were interesting. Certain biomes will not generate like jungle. This is likely due to height restrictions.

 

The mod is only one class (file) and excluding build.properties and mcmod.info the mod class is only 83 lines long with lots of blank lines and comments.

 

Your latest accomplishments are interesting to me. I'd love to see how you did it your way. I've restarted my alpha mod for phase 2. Comprehensive config file. Phase 3 will be adding all those WorldProviders, Chunkproviders, WorldType, and GenLayer classes the allow better control of spawnfuzz and noise generation (at all levels) and other aspects.

 

I haven't figured out why spawnfuzz settings in forge.cfg seem to have no effect with or without my mod. There's a lot of magic numbers scattered throughout vanilla Minecraft and Forge classes that drive me crazy.

 

Oh, I'm doing this in minecraft 1.8 with forge 11.14.3.1515

Posted

Thanks elix for keeping this topic up to date. I too made a mod doing the basic same thing you wanted just Oct 9th 2015. Not released or published as I haven't picked a license yet. Hate that part. It was a few lines of code. I just modified the all the biome's min and max heights to 0.0 except for hell, end, and extreme hills biomes.  The side effects were interesting. Certain biomes will not generate like jungle. This is likely due to height restrictions.

 

The mod is only one class (file) and excluding build.properties and mcmod.info the mod class is only 83 lines long with lots of blank lines and comments.

 

Your latest accomplishments are interesting to me. I'd love to see how you did it your way. I've restarted my alpha mod for phase 2. Comprehensive config file. Phase 3 will be adding all those WorldProviders, Chunkproviders, WorldType, and GenLayer classes the allow better control of spawnfuzz and noise generation (at all levels) and other aspects.

 

I haven't figured out why spawnfuzz settings in forge.cfg seem to have no effect with or without my mod. There's a lot of magic numbers scattered throughout vanilla Minecraft and Forge classes that drive me crazy.

 

Oh, I'm doing this in minecraft 1.8 with forge 11.14.3.1515

Thanks!

Yes, i know i have already played with everything that i managed to make configurable.

If you want to understand what is where, above there's link to gist with world gen files.

I managed to deobfuscate a lot, so most of fields are self explanatory. Also, quite often, i leave comment in code, describing what it is doing, if field names are not enough.

 

If you know how to make biomes more configurable then i currently can or now any other fields deobfuscation, please tell it. It will help me and others who will work with world gen a lot!

 

Here's link to gist (copied from main post): https://gist.github.com/elix-x/4d28c4813c4064f82e00

Posted

Interesting topic indeed. Mind if I borrow some code on the water removal?

If anyone has a comprehensive, visual guide to GUIs - don't hesitate to message me. They make my head spin.

Posted

Interesting topic indeed. Mind if I borrow some code on the water removal?

Yes, you can. It's free to use anywhere.

Also, right now i am replacing y<62 lakes with grass and dirt, this ignores biome filler and top blocks. I have not worked on changing it per biome yet.

 

EDIT: It also makes plains out of oceans :D

  • 4 weeks later...
Posted

Alright, i have some more advancements:

-All this huge obfuscated GenLayer mess is just to determine biomes.

-So i found where biomes are generated! Yay!

-And i managed to force override them per chunk.

I also looked at some world gen mods, mainly realistic terrain ones.

And i'm afraid. Because what my final goal for mod is, i haven't found it being implemented by anybody. At looking at code required for vanilla and world gen mods to work... And complexity of concept... It seems like what i'm working on is harder than bytecode stackmap frames.

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

Announcements



×
×
  • Create New...

Important Information

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