Modding 1.4.7: Adding a custom biome to your dimension

In this tutorial I will show you how to add your custom biome to a custom dimension. To understand this tutorial you will need to have read the Biome tutorials and Dimension tutorials. The file where you need to add the biome is the WorldProvider class. This is the file I will start with.


package tutorial;

importnet.minecraft.world.WorldProvider;
import net.minecraft.world.WorldType;
importnet.minecraft.world.biome.BiomeGenBase;
importnet.minecraft.world.biome.WorldChunkManagerHell;
importnet.minecraft.world.chunk.IChunkProvider;
publicclass WorldProviderTutorial extends WorldProvider
{
       publicvoid registerWorldChunkManager()
       {
             this.worldChunkMgr = newWorldChunkManagerHell(BiomeGenBase.beach, 0.8F, 0.1F);
             this.dimensionId = Tutorial.dimension;
       }
      
       public String getDimensionName()
       {
             return“Tutorial”;
       }
      
       publicboolean canRespawnHere()
       {
             returntrue;
       }
      
       public String getSaveFolder()
    {
        return“Custom Dimension Tutorial Folder”;
    }
      
       publicdouble getMovementFactor()
    {
             return 25.0;
    }
      
       @Override
       public IChunkProvider createChunkGenerator()
       {
             returnnewChunkProviderTutorial(worldObj, worldObj.getSeed(), true);
       }
}

Adding a custom biome to your dimension is really easy. Simply replace the BiomeGenBase.beach into modfile.biomename.
The registerWorldChunkManager should look something like this after you have added your custom biome.


publicvoid registerWorldChunkManager()

       {
             this.worldChunkMgr = newWorldChunkManagerHell(Tutorial.tutorialBiome, 0.8F, 0.1F);
             this.dimensionId = Tutorial.dimension;
       }

That’s everything you need for this tutorial.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">