2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.biomes;
|
|
|
|
|
|
|
|
import java.awt.Color;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
2013-05-29 01:05:27 +00:00
|
|
|
import biomesoplenty.configuration.BOPConfiguration;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
public class BiomeGenDunes extends BiomeGenBase
|
|
|
|
{
|
|
|
|
private BiomeDecoratorBOP customBiomeDecorator;
|
|
|
|
|
|
|
|
public BiomeGenDunes(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
this.spawnableCreatureList.clear();
|
|
|
|
this.topBlock = (byte)Block.sand.blockID;
|
|
|
|
this.fillerBlock = (byte)Block.sand.blockID;
|
|
|
|
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
|
|
|
this.customBiomeDecorator.treesPerChunk = -999;
|
|
|
|
this.customBiomeDecorator.deadBushPerChunk = -999;
|
|
|
|
this.customBiomeDecorator.duneGrassPerChunk = 10;
|
|
|
|
this.customBiomeDecorator.desertSproutsPerChunk = 5;
|
2013-05-08 03:25:14 +00:00
|
|
|
this.customBiomeDecorator.aloePerChunk = 1;
|
2013-05-03 13:00:44 +00:00
|
|
|
this.customBiomeDecorator.reedsPerChunk = -999;
|
|
|
|
this.customBiomeDecorator.generateLakes = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* takes temperature, returns color
|
|
|
|
*/
|
|
|
|
public int getSkyColorByTemp(float par1)
|
|
|
|
{
|
|
|
|
if (BOPConfiguration.skyColors = true)
|
|
|
|
{
|
|
|
|
return 14203007;
|
|
|
|
}
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|