001 package net.minecraft.src;
002
003 import cpw.mods.fml.common.Side;
004 import cpw.mods.fml.common.asm.SideOnly;
005 import java.util.Random;
006
007 public class BiomeGenSwamp extends BiomeGenBase
008 {
009 protected BiomeGenSwamp(int par1)
010 {
011 super(par1);
012 this.theBiomeDecorator.treesPerChunk = 2;
013 this.theBiomeDecorator.flowersPerChunk = -999;
014 this.theBiomeDecorator.deadBushPerChunk = 1;
015 this.theBiomeDecorator.mushroomsPerChunk = 8;
016 this.theBiomeDecorator.reedsPerChunk = 10;
017 this.theBiomeDecorator.clayPerChunk = 1;
018 this.theBiomeDecorator.waterlilyPerChunk = 4;
019 this.waterColorMultiplier = 14745518;
020 this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1));
021 }
022
023 /**
024 * Gets a WorldGen appropriate for this biome.
025 */
026 public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
027 {
028 return this.worldGeneratorSwamp;
029 }
030
031 @SideOnly(Side.CLIENT)
032
033 /**
034 * Provides the basic grass color based on the biome temperature and rainfall
035 */
036 public int getBiomeGrassColor()
037 {
038 double var1 = (double)this.getFloatTemperature();
039 double var3 = (double)this.getFloatRainfall();
040 return ((ColorizerGrass.getGrassColor(var1, var3) & 16711422) + 5115470) / 2;
041 }
042
043 @SideOnly(Side.CLIENT)
044
045 /**
046 * Provides the basic foliage color based on the biome temperature and rainfall
047 */
048 public int getBiomeFoliageColor()
049 {
050 double var1 = (double)this.getFloatTemperature();
051 double var3 = (double)this.getFloatRainfall();
052 return ((ColorizerFoliage.getFoliageColor(var1, var3) & 16711422) + 5115470) / 2;
053 }
054 }