001 package net.minecraft.src; 002 003 import java.util.Random; 004 005 public class BiomeGenJungle extends BiomeGenBase 006 { 007 public BiomeGenJungle(int par1) 008 { 009 super(par1); 010 this.theBiomeDecorator.treesPerChunk = 50; 011 this.theBiomeDecorator.grassPerChunk = 25; 012 this.theBiomeDecorator.flowersPerChunk = 4; 013 this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); 014 this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 10, 4, 4)); 015 } 016 017 /** 018 * Gets a WorldGen appropriate for this biome. 019 */ 020 public WorldGenerator getRandomWorldGenForTrees(Random par1Random) 021 { 022 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)))); 023 } 024 025 /** 026 * Gets a WorldGen appropriate for this biome. 027 */ 028 public WorldGenerator getRandomWorldGenForGrass(Random par1Random) 029 { 030 return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1); 031 } 032 033 public void decorate(World par1World, Random par2Random, int par3, int par4) 034 { 035 super.decorate(par1World, par2Random, par3, par4); 036 WorldGenVines var5 = new WorldGenVines(); 037 038 for (int var6 = 0; var6 < 50; ++var6) 039 { 040 int var7 = par3 + par2Random.nextInt(16) + 8; 041 byte var8 = 64; 042 int var9 = par4 + par2Random.nextInt(16) + 8; 043 var5.generate(par1World, par2Random, var7, var8, var9); 044 } 045 } 046 }