    001package net.minecraft.world.biome;
    002
    003import java.util.Random;
    004import net.minecraft.block.Block;
    005import net.minecraft.entity.passive.EntityChicken;
    006import net.minecraft.entity.passive.EntityOcelot;
    007import net.minecraft.world.World;
    008import net.minecraft.world.gen.feature.WorldGenHugeTrees;
    009import net.minecraft.world.gen.feature.WorldGenShrub;
    010import net.minecraft.world.gen.feature.WorldGenTallGrass;
    011import net.minecraft.world.gen.feature.WorldGenTrees;
    012import net.minecraft.world.gen.feature.WorldGenVines;
    013import net.minecraft.world.gen.feature.WorldGenerator;
    014
    015public class BiomeGenJungle extends BiomeGenBase
    016{
    017    public BiomeGenJungle(int par1)
    018    {
    019        super(par1);
    020        this.theBiomeDecorator.treesPerChunk = 50;
    021        this.theBiomeDecorator.grassPerChunk = 25;
    022        this.theBiomeDecorator.flowersPerChunk = 4;
    023        this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
    024        this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 10, 4, 4));
    025    }
    026
    027    /**
    028     * Gets a WorldGen appropriate for this biome.
    029     */
    030    public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
    031    {
    032        return (WorldGenerator)(par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenShrub(3, 0) : (par1Random.nextInt(3) == 0 ? new WorldGenHugeTrees(false, 10 + par1Random.nextInt(20), 3, 3) : new WorldGenTrees(false, 4 + par1Random.nextInt(7), 3, 3, true))));
    033    }
    034
    035    /**
    036     * Gets a WorldGen appropriate for this biome.
    037     */
    038    public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
    039    {
    040        return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
    041    }
    042
    043    public void decorate(World par1World, Random par2Random, int par3, int par4)
    044    {
    045        super.decorate(par1World, par2Random, par3, par4);
    046        WorldGenVines worldgenvines = new WorldGenVines();
    047
    048        for (int k = 0; k < 50; ++k)
    049        {
    050            int l = par3 + par2Random.nextInt(16) + 8;
    051            byte b0 = 64;
    052            int i1 = par4 + par2Random.nextInt(16) + 8;
    053            worldgenvines.generate(par1World, par2Random, l, b0, i1);
    054        }
    055    }
    056}