How to make a biome naturally generate.

HunterHans

Terrarian
I made a custom biome but i don't know how to make it generate in world. how do i do that?
 
ExampleOre
This shows how to add a worldgen pass. A biome is basically the same, just more than one tile.

Example Biomes
 
What file do you put the worldgen pass in?
 
Any file you'd like
 
Any file you'd like
How do i make it generate only in the underground jungle? i've tried:

for (int k = 0; k < (int)(1); k++)
{
int x = WorldGen.genRand.Next((int)GenVars.jungleMinX, GenVars.jungleMaxX);

int y = WorldGen.genRand.Next((int)GenVars.rockLayer, Main.maxTilesY);

WorldGen.TileRunner(x, y, WorldGen.genRand.Next(3,100), WorldGen.genRand.Next(2,100), ModContent.TileType<GroveMossTile>());
}


but that just makes it generate at the uttermost left side of the map every time.
 
Are you able to debug it and see the value of jungleMinX? If it's generating only in the left it sounds like that value is 0. Maybe your worldgen pass is too early and the value isn't set yet.
 
How do you see that? I only downloaded visual studio 2 days ago and barely know how to use it.
 
Are you able to debug it and see the value of jungleMinX? If it's generating only in the left it sounds like that value is 0. Maybe your worldgen pass is too early and the value isn't set yet.
how do you see values in debug mode?
 
Are you able to debug it and see the value of jungleMinX? If it's generating only in the left it sounds like that value is 0. Maybe your worldgen pass is too early and the value isn't set yet.
so how do you do this?
 
Back
Top Bottom