Blogs Tutorial

modding tutorial 6: biomes

  • 2.3k views 1 today
  • 7
  • 1
  • 7
waterskier
Lvl 54Grandmaster Pony
158
Hey everyone I have a highly requested tutorial for you. In this one I will teach you how to make a new biome. (this tutorial will be very easy)

In this we only need 2 classes
mod_diamond
BiomeGendiamond

mod_diamond
obviously we need it to extend basemod and have the load and getversion methods
then in the load method we need
Modloader.addBiome(diamond);
then outside the methods we need
public static final BiomeGenBase diamond = (new BiomeGendiamond(25)).setColor(0xfa9418).setBiomeName("diamond biome");

0xfa9418 is the grass color, and 25 is just the next open biome if you make 2 new biomes you will want 1 to have 25, and 1 to have 26 and so on

after that we are done with our mod_ class and it should look like this
mod_ finished
package net.minecraft.src;
public class mod_diamond extends BaseMod
{
public static final BiomeGenBase diamond = (new BiomeGendiamond(25)).setColor(0xfa9418).setBiomeName("diamond biome");

public void load()
{
ModLoader.addBiome(diamond);
}

public String getVersion()
{
return "1.2.5";
}
}


BiomeGendiamond
this is VERY self explanitory. I will explain a little anyways though after I post the finished code
BiomeGendiamond finished

package net.minecraft.src;

import java.util.List;
import java.util.Random;

public class BiomeGendiamond extends BiomeGenBase
{
public BiomeGendiamond(int par1)
{
super(par1);
spawnableCreatureList.clear();
topBlock = (byte)Block.blockDiamond.blockID;
fillerBlock = (byte)Block.blockDiamond.blockID;

biomeDecorator.treesPerChunk = 1;
biomeDecorator.flowersPerChunk = 1;
biomeDecorator.grassPerChunk = 1;
biomeDecorator.deadBushPerChunk = 1;
biomeDecorator.reedsPerChunk = 1;
biomeDecorator.cactiPerChunk = 1;
biomeDecorator.mushroomsPerChunk = 1;
biomeDecorator.clayPerChunk = 1;
biomeDecorator.waterlilyPerChunk = 1;

}}

trees/flowers/grass/bush/reeds/cacti/mushrooms/clay/waterlilly per chunk says how much there is in a 16x16x256 space
filler block is like stone for normal biomes
top block is like grass/dirt for normal biomes
and finally spawnable creature list is what creatures can spawn. Clear means all can spawn there
and then you are finished with your biome!!!

thanks for reading! Leave any error code in the comments along with suggestions for future tutorials,and as always diamond and subscribe!

More like this

  Have something to say?

mrhow2minecraft
09/26/2012 4:35 am
Level 57 : Grandmaster Taco
This seems to be stolen from Techguy's tutorials. He used the exact same biome color and ID in his examples. I doubt that's coincidence.
1
ParkerCraftLite
05/21/2012 5:18 pm
Level 20 : Expert Cake
Hey if you are able to...please make a tutorial on how to code with java
1
xXRegablithXx
05/31/2012 1:55 pm
Level 1 : New Miner
*facepalm*
1
waterskier
05/21/2012 5:42 pm
Level 54 : Grandmaster Pony
lol wut? this is java
1
sed11
05/19/2012 11:08 am
Level 66 : High Grandmaster Hero
I added a new block for the biome and its the filler block.

And when I recompile it gets an error with it.Its the exact same name as the new block.....

"fillerblock = (byte)Block.DarkStone.blockID;"
1
waterskier
05/19/2012 3:51 pm
Level 54 : Grandmaster Pony
I know what you dos wrong. This is a VERY common error.
For you to understand this I will need to explain what block. Means
When you say block.(whatever) you are not saying it is a block and this is the name, you are saying it is in the block class and here is the blok name

So if you want to correct this error instead of
Block.darkstone
You do
Mod_yourmodsname.darkstone
1
XxDarkElement
05/19/2012 4:54 am
Level 48 : Master Pony
nice
1

Welcome