45 lines
1.4 KiB
Java
45 lines
1.4 KiB
Java
|
package biomesoplenty.biomes;
|
||
|
|
||
|
import java.util.Random;
|
||
|
|
||
|
import biomesoplenty.api.Blocks;
|
||
|
import biomesoplenty.configuration.BOPBlocks;
|
||
|
import biomesoplenty.worldgen.WorldGenPrairie;
|
||
|
|
||
|
import net.minecraft.block.Block;
|
||
|
import net.minecraft.item.ItemStack;
|
||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||
|
import net.minecraft.world.gen.feature.WorldGenTallGrass;
|
||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||
|
|
||
|
public class BiomeGenPrairie extends BiomeGenBase
|
||
|
{
|
||
|
private BiomeDecoratorBOP customBiomeDecorator;
|
||
|
|
||
|
public BiomeGenPrairie(int par1)
|
||
|
{
|
||
|
super(par1);
|
||
|
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||
|
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||
|
this.customBiomeDecorator.treesPerChunk = 1;
|
||
|
this.customBiomeDecorator.grassPerChunk = 999;
|
||
|
this.customBiomeDecorator.whiteFlowersPerChunk = 45;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gets a WorldGen appropriate for this biome.
|
||
|
*/
|
||
|
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||
|
{
|
||
|
return new WorldGenPrairie(false);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gets a WorldGen appropriate for this biome.
|
||
|
*/
|
||
|
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
|
||
|
{
|
||
|
return (par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 1) : (par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 2) : new WorldGenTallGrass(Blocks.foliage.get().blockID, 1)));
|
||
|
}
|
||
|
}
|