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

57 lines
1.3 KiB
Java
Raw Normal View History

2013-05-03 13:00:44 +00:00
package biomesoplenty.biomes;
import java.awt.Color;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPConfiguration;
2013-05-03 13:00:44 +00:00
public class BiomeGenMesa extends BiomeGenBase
{
2013-05-31 10:34:02 +00:00
private BiomeDecoratorBOP customBiomeDecorator;
2013-05-03 13:00:44 +00:00
@SuppressWarnings("unchecked")
public BiomeGenMesa(int par1)
2013-05-31 10:34:02 +00:00
{
super(par1);
spawnableCreatureList.clear();
topBlock = (byte)Blocks.redRock.get().blockID;
fillerBlock = (byte)Blocks.redRock.get().blockID;
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = -999;
customBiomeDecorator.deadBushPerChunk = 2;
customBiomeDecorator.desertGrassPerChunk = 10;
customBiomeDecorator.tinyCactiPerChunk = 2;
spawnableMonsterList.add(new SpawnListEntry(EntitySpider.class, 15, 2, 6));
}
/**
* takes temperature, returns color
*/
@Override
public int getSkyColorByTemp(float par1)
{
2013-05-03 13:00:44 +00:00
if (BOPConfiguration.skyColors = true)
2013-05-31 10:34:02 +00:00
return 15898486;
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();
}
2013-05-31 10:34:02 +00:00
}
2013-05-03 13:00:44 +00:00
}