BiomesOPlenty/src/minecraft/biomesoplenty/biomes/BiomeGenShield.java
2013-05-03 23:00:44 +10:00

68 lines
2.1 KiB
Java

package biomesoplenty.biomes;
import java.util.Random;
import biomesoplenty.worldgen.WorldGenMoss;
import biomesoplenty.worldgen.WorldGenTaiga5;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenShield extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenShield(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 7;
this.customBiomeDecorator.grassPerChunk = 12;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.gravelPerChunk = 4;
this.customBiomeDecorator.gravelPerChunk2 = 4;
this.customBiomeDecorator.generateStoneInGrass2 = true;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(2) == 0 ? new WorldGenShrub(0,0) : new WorldGenTaiga5(false));
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenMoss var5 = new WorldGenMoss();
for (int var6 = 0; var6 < 20; ++var6)
{
int var7 = par3 + par2Random.nextInt(16) + 8;
byte var8 = 58;
int var9 = par4 + par2Random.nextInt(16) + 8;
var5.generate(par1World, par2Random, var7, var8, var9);
}
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 6586168;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 7902787;
}
}