205
Ok guys, today im going to be showing you how to code a biome! first to get started i am going to say, this is not complicated at all!!!!! making a biome generate is very simple. So shall we get started? YES!!!!!!!
Code
just copy and paste this into your load method:
ModLoader.addBiome(Test); //registers the biome
After that paste this in the public static final area, we are now calling that the "Variables Section"
BiomeGenTest Test = new BiomeGenTest(23); //creates the biome
then create a new class called BiomeGenTest.class and paste this code:
package net.minecraft.src;
public class BiomeGenTest extends BiomeGenBase
{
protected BiomeGenTest(int par1)
{
super(par1);
this.theBiomeDecorator.treesPerChunk = -999; //-999 is equal to 0
this.theBiomeDecorator.flowersPerChunk = 4; //flowers per chunk
this.theBiomeDecorator.grassPerChunk = 10; //grass per chunk
this.fillerBlock=(byte)Block.glass.blockID; //sets the block that spawns below the top block
this.topBlock=(byte)Block.dirt.blockID; //sets the block that spawns on top
this.biomeName="Test Biome"; //sets the ingame name when f3 pressed
}
}
That's all of the code needed!
ModLoader.addBiome(Test); //registers the biome
After that paste this in the public static final area, we are now calling that the "Variables Section"
BiomeGenTest Test = new BiomeGenTest(23); //creates the biome
then create a new class called BiomeGenTest.class and paste this code:
package net.minecraft.src;
public class BiomeGenTest extends BiomeGenBase
{
protected BiomeGenTest(int par1)
{
super(par1);
this.theBiomeDecorator.treesPerChunk = -999; //-999 is equal to 0
this.theBiomeDecorator.flowersPerChunk = 4; //flowers per chunk
this.theBiomeDecorator.grassPerChunk = 10; //grass per chunk
this.fillerBlock=(byte)Block.glass.blockID; //sets the block that spawns below the top block
this.topBlock=(byte)Block.dirt.blockID; //sets the block that spawns on top
this.biomeName="Test Biome"; //sets the ingame name when f3 pressed
}
}
That's all of the code needed!
Video Tutorial
Tags |
tools/tracking
2375882
6
modding-tutorial-episode-4---biomes
Create an account or sign in to comment.