Anyone coding in 1.7.2 that wants biomes should know that the old .addBiome no longer works. In fact there is no "easy" way to make a biome with out some serious amount of coding. I need help on this, I'm getting close to figuring it out, but I'm stuck so i'll give you my ideas and what I have but I'd love some input and I'd like to know how to make this a little easier, and the goal here is to eventually make it so someone can make a tutorial on this!
So what I have so far is I know we are going to have to do a few things here. We will need to copy and rewrite the following files.
GenLayerBiome
BiomeGenBase
You'll need to create a new Biome obviously thats easy.
In GenLayerBiome this code exists pointing to the idea of not only registry but spawning the biome into the game.
public GenLayerBiome(long par1, GenLayer par3GenLayer, WorldType par4WorldType)
{
super(par1);
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.desert, BiomeGenBase.desert, BiomeGenBase.savanna, BiomeGenBase.savanna, BiomeGenBase.plains};
this.field_151621_d = new BiomeGenBase[] {BiomeGenBase.forest, BiomeGenBase.roofedForest, BiomeGenBase.extremeHills, BiomeGenBase.plains, BiomeGenBase.birchForest, BiomeGenBase.swampland};
this.field_151622_e = new BiomeGenBase[] {BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.taiga, BiomeGenBase.plains};
this.field_151620_f = new BiomeGenBase[] {BiomeGenBase.icePlains, BiomeGenBase.icePlains, BiomeGenBase.icePlains, BiomeGenBase.coldTaiga};
this.parent = par3GenLayer;
if (par4WorldType == WorldType.DEFAULT_1_1)
{
this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
}
}
So whats the problem with it? It's not a method so you can't call it in your registry, meaning you need some communication. IN THEORY you can just say,
GenLayerBiome genNewBiomes = new GenLayerBiome(par1, genNewBiome, worldType.DEFAULT);
We will encounter errors here, also what is long par1? According to eclipse genNewBiome isn't initialized yet. Which... makes no sense really.
So in theory you create your biomes in your new biomeGenBase class, then add them into your own array inside your genLayerBiome class, then call it by the code I gave above... right?
Am I on the right track here? Or am I way off. I really would love to know and I'd like to find out more if I am wrong on how this code can start to work!
Thanks for all the help!
So what I have so far is I know we are going to have to do a few things here. We will need to copy and rewrite the following files.
GenLayerBiome
BiomeGenBase
You'll need to create a new Biome obviously thats easy.
In GenLayerBiome this code exists pointing to the idea of not only registry but spawning the biome into the game.
public GenLayerBiome(long par1, GenLayer par3GenLayer, WorldType par4WorldType) { super(par1); this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.desert, BiomeGenBase.desert, BiomeGenBase.savanna, BiomeGenBase.savanna, BiomeGenBase.plains}; this.field_151621_d = new BiomeGenBase[] {BiomeGenBase.forest, BiomeGenBase.roofedForest, BiomeGenBase.extremeHills, BiomeGenBase.plains, BiomeGenBase.birchForest, BiomeGenBase.swampland}; this.field_151622_e = new BiomeGenBase[] {BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.taiga, BiomeGenBase.plains}; this.field_151620_f = new BiomeGenBase[] {BiomeGenBase.icePlains, BiomeGenBase.icePlains, BiomeGenBase.icePlains, BiomeGenBase.coldTaiga}; this.parent = par3GenLayer; if (par4WorldType == WorldType.DEFAULT_1_1) { this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga}; } }So whats the problem with it? It's not a method so you can't call it in your registry, meaning you need some communication. IN THEORY you can just say,
We will encounter errors here, also what is long par1? According to eclipse genNewBiome isn't initialized yet. Which... makes no sense really.
So in theory you create your biomes in your new biomeGenBase class, then add them into your own array inside your genLayerBiome class, then call it by the code I gave above... right?
Am I on the right track here? Or am I way off. I really would love to know and I'd like to find out more if I am wrong on how this code can start to work!
Thanks for all the help!