BiomesOPlenty/src/minecraft/biomesoplenty/biomes/BiomeGenFrostForest.java

77 lines
1.7 KiB
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.biomes;
import java.awt.Color;
import java.util.Random;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.configuration.BOPConfiguration;
2013-05-03 13:00:44 +00:00
public class BiomeGenFrostForest extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenFrostForest(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 3;
this.customBiomeDecorator.grassPerChunk = 1;
this.customBiomeDecorator.flowersPerChunk = -999;
this.customBiomeDecorator.mushroomsPerChunk = -999;
this.customBiomeDecorator.generatePumpkins = false;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return this.worldGeneratorTrees;
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 11261628;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 11261628;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (BOPConfiguration.skyColors = true)
{
return 13557994;
}
else
{
par1 /= 3.0F;
if (par1 < -1.0F)
{
par1 = -1.0F;
}
if (par1 > 1.0F)
{
par1 = 1.0F;
}
return Color.getHSBColor(0.62222224F - par1 * 0.05F, 0.5F + par1 * 0.1F, 1.0F).getRGB();
}
}
}