    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 var5 = new WorldGenVines();
    047
    048        for (int var6 = 0; var6 < 50; ++var6)
    049        {
    050            int var7 = par3 + par2Random.nextInt(16) + 8;
    051            byte var8 = 64;
    052            int var9 = par4 + par2Random.nextInt(16) + 8;
    053            var5.generate(par1World, par2Random, var7, var8, var9);
    054        }
    055    }
    056}