BiomesOPlenty/src/minecraft/biomesoplenty/biomes/BiomeGenRedwoodForest.java

45 lines
1.6 KiB
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.biomes;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenShrub;
2013-05-03 13:00:44 +00:00
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.worldgen.WorldGenRedwoodTree;
import biomesoplenty.worldgen.WorldGenRedwoodTree2;
2013-05-03 13:00:44 +00:00
public class BiomeGenRedwoodForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenRedwoodForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 6;
2013-05-03 13:00:44 +00:00
this.customBiomeDecorator.grassPerChunk = 16;
this.customBiomeDecorator.bushesPerChunk = 4;
this.customBiomeDecorator.berryBushesPerChunk = 1;
2013-05-03 13:00:44 +00:00
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(4) == 0 ? new WorldGenRedwoodTree(false) : (par1Random.nextInt(2) == 0 ? new WorldGenShrub(0,0) : new WorldGenRedwoodTree2(false)));
2013-05-03 13:00:44 +00:00
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
}