Minecraft Blogs / Tutorial

modding tutorial 6: biomes

  • 2,181 views, 2 today
  • 7
  • 1
  • 7
waterskier's Avatar waterskier
Level 54 : Grandmaster 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!
Tags

Create an account or sign in to comment.

1
09/26/2012 4:35 am
Level 57 : Grandmaster Taco
mrhow2minecraft
mrhow2minecraft's Avatar
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
05/21/2012 5:18 pm
Level 20 : Expert Cake
ParkerCraftLite
ParkerCraftLite's Avatar
Hey if you are able to...please make a tutorial on how to code with java
1
05/31/2012 1:55 pm
Level 1 : New Miner
xXRegablithXx
xXRegablithXx's Avatar
*facepalm*
1
05/21/2012 5:42 pm
Level 54 : Grandmaster Pony
waterskier
waterskier's Avatar
lol wut? this is java
1
05/19/2012 11:08 am
Level 66 : High Grandmaster Hero
sed11
sed11's Avatar
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
05/19/2012 3:51 pm
Level 54 : Grandmaster Pony
waterskier
waterskier's Avatar
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
05/19/2012 4:54 am
Level 48 : Master Pony
XxDarkElement
XxDarkElement's Avatar
nice
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome