2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.biomes;
|
|
|
|
|
|
|
|
import java.awt.Color;
|
|
|
|
|
|
|
|
import biomesoplenty.api.Blocks;
|
|
|
|
import biomesoplenty.configuration.BOPBlocks;
|
|
|
|
import biomesoplenty.configuration.BOPConfiguration;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
|
|
|
|
|
|
|
public class BiomeGenBadlands extends BiomeGenBase
|
|
|
|
{
|
|
|
|
private BiomeDecoratorBOP customBiomeDecorator;
|
|
|
|
|
|
|
|
public BiomeGenBadlands(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
this.spawnableCreatureList.clear();
|
2013-05-12 18:58:49 +00:00
|
|
|
this.topBlock = (byte)Blocks.hardSand.get().blockID;
|
|
|
|
this.fillerBlock = (byte)Block.blockClay.blockID;
|
2013-05-03 13:00:44 +00:00
|
|
|
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
|
|
|
this.customBiomeDecorator.treesPerChunk = -999;
|
|
|
|
this.customBiomeDecorator.deadBushPerChunk = 4;
|
|
|
|
this.customBiomeDecorator.reedsPerChunk = -999;
|
|
|
|
this.customBiomeDecorator.cactiPerChunk = 2;
|
|
|
|
this.customBiomeDecorator.clayPerChunk = 3;
|
|
|
|
this.customBiomeDecorator.generateClayInStone = true;
|
|
|
|
this.customBiomeDecorator.generateSandInStone = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* takes temperature, returns color
|
|
|
|
*/
|
|
|
|
public int getSkyColorByTemp(float par1)
|
|
|
|
{
|
|
|
|
if (BOPConfiguration.skyColors = true)
|
|
|
|
{
|
2013-05-12 18:58:49 +00:00
|
|
|
return 9814727;
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|