2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.biomes;
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenShrub;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
2013-05-29 01:05:27 +00:00
|
|
|
import biomesoplenty.api.Blocks;
|
|
|
|
import biomesoplenty.worldgen.WorldGenAcacia;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
public class BiomeGenSavanna extends BiomeGenBase
|
|
|
|
{
|
|
|
|
private BiomeDecoratorBOP customBiomeDecorator;
|
|
|
|
|
|
|
|
public BiomeGenSavanna(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
2013-05-15 19:20:32 +00:00
|
|
|
this.customBiomeDecorator.treesPerChunk = 2;
|
2013-05-03 13:00:44 +00:00
|
|
|
this.customBiomeDecorator.flowersPerChunk = -999;
|
|
|
|
this.customBiomeDecorator.purpleFlowersPerChunk = 10;
|
|
|
|
this.customBiomeDecorator.tinyFlowersPerChunk = 2;
|
|
|
|
this.customBiomeDecorator.grassPerChunk = 25;
|
2013-05-15 19:20:32 +00:00
|
|
|
this.customBiomeDecorator.bushesPerChunk = 10;
|
2013-05-03 13:00:44 +00:00
|
|
|
this.customBiomeDecorator.generatePumpkins = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a WorldGen appropriate for this biome.
|
|
|
|
*/
|
|
|
|
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
|
|
|
{
|
2013-05-15 19:20:32 +00:00
|
|
|
return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenAcacia(false) : new WorldGenShrub(0,0));
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a WorldGen appropriate for this biome.
|
|
|
|
*/
|
|
|
|
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
|
|
|
|
{
|
2013-05-07 04:41:56 +00:00
|
|
|
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 2) : new WorldGenTallGrass(Blocks.foliage.get().blockID, 1);
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
}
|