2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.biomes;
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
import biomesoplenty.worldgen.WorldGenMoss;
|
|
|
|
|
|
|
|
import net.minecraft.entity.passive.EntityWolf;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
|
|
|
import net.minecraft.world.biome.SpawnListEntry;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
|
|
|
|
|
|
public class BiomeGenForestNew extends BiomeGenBase
|
|
|
|
{
|
|
|
|
private BiomeDecoratorBOP customBiomeDecorator;
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
public BiomeGenForestNew(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
|
|
|
|
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
|
|
|
this.customBiomeDecorator.treesPerChunk = 10;
|
|
|
|
this.customBiomeDecorator.grassPerChunk = 2;
|
|
|
|
this.customBiomeDecorator.hydrangeasPerChunk = 2;
|
|
|
|
this.customBiomeDecorator.whiteFlowersPerChunk = 1;
|
2013-05-06 05:58:23 +00:00
|
|
|
this.customBiomeDecorator.reedsBOPPerChunk = 5;
|
2013-05-06 10:19:33 +00:00
|
|
|
this.customBiomeDecorator.poisonIvyPerChunk = 2;
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a WorldGen appropriate for this biome.
|
|
|
|
*/
|
|
|
|
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
|
|
|
{
|
|
|
|
//return (WorldGenerator)(par1Random.nextInt(3) == 0 ? new WorldGenWhiteOak1() : (par1Random.nextInt(5) == 0 ? new WorldGenAlder2() : (par1Random.nextInt(8) == 0 ? new WorldGenAlder1() : (par1Random.nextInt(4) == 0 ? new WorldGenPaperBirch2() : (par1Random.nextInt(7) == 0 ? new WorldGenPaperBirch1() : new WorldGenWhiteOak2())))));
|
|
|
|
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? this.worldGeneratorForest : (par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : this.worldGeneratorTrees));
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|