BiomesOPlenty/common/biomesoplenty/biomes/BiomeGenVolcano.java

66 lines
1.5 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;
2013-05-03 13:00:44 +00:00
import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.WorldGenVolcano;
public class BiomeGenVolcano extends BiomeGenBase
{
2013-05-31 10:34:02 +00:00
private BiomeDecoratorBOP customBiomeDecorator;
2013-05-03 13:00:44 +00:00
public BiomeGenVolcano(int par1)
2013-05-31 10:34:02 +00:00
{
super(par1);
spawnableCreatureList.clear();
topBlock = (byte)Blocks.ashStone.get().blockID;
fillerBlock = (byte)Blocks.ashStone.get().blockID;
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 1;
customBiomeDecorator.flowersPerChunk = -999;
customBiomeDecorator.grassPerChunk = -999;
customBiomeDecorator.lavaLakesPerChunk = 50;
customBiomeDecorator.generateAsh = true;
}
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
/**
* Gets a WorldGen appropriate for this biome.
*/
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return new WorldGenVolcano();
}
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
/**
* takes temperature, returns color
*/
@Override
public int getSkyColorByTemp(float par1)
{
2013-08-03 00:07:43 +00:00
if (BOPConfiguration.Misc.skyColors)
2013-05-31 10:34:02 +00:00
return 8026746;
else
{
par1 /= 3.0F;
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
if (par1 < -1.0F)
{
par1 = -1.0F;
}
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
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-03 13:00:44 +00:00
}