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 } 021 022 /** 023 * Gets a WorldGen appropriate for this biome. 024 */ 025 public WorldGenerator getRandomWorldGenForTrees(Random par1Random) 026 { 027 return this.worldGeneratorSwamp; 028 } 029 030 @SideOnly(Side.CLIENT) 031 032 /** 033 * Provides the basic grass color based on the biome temperature and rainfall 034 */ 035 public int getBiomeGrassColor() 036 { 037 double var1 = (double)this.getFloatTemperature(); 038 double var3 = (double)this.getFloatRainfall(); 039 return ((ColorizerGrass.getGrassColor(var1, var3) & 16711422) + 5115470) / 2; 040 } 041 042 @SideOnly(Side.CLIENT) 043 044 /** 045 * Provides the basic foliage color based on the biome temperature and rainfall 046 */ 047 public int getBiomeFoliageColor() 048 { 049 double var1 = (double)this.getFloatTemperature(); 050 double var3 = (double)this.getFloatRainfall(); 051 return ((ColorizerFoliage.getFoliageColor(var1, var3) & 16711422) + 5115470) / 2; 052 } 053 }