    001    package net.minecraft.world.biome;
    002
    003    import java.util.Random;
    004    import net.minecraft.block.Block;
    005    import net.minecraft.entity.passive.EntityChicken;
    006    import net.minecraft.entity.passive.EntityOcelot;
    007    import net.minecraft.world.World;
    008    import net.minecraft.world.gen.feature.WorldGenHugeTrees;
    009    import net.minecraft.world.gen.feature.WorldGenShrub;
    010    import net.minecraft.world.gen.feature.WorldGenTallGrass;
    011    import net.minecraft.world.gen.feature.WorldGenTrees;
    012    import net.minecraft.world.gen.feature.WorldGenVines;
    013    import net.minecraft.world.gen.feature.WorldGenerator;
    014
    015    public 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    }