2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.biomes;
|
|
|
|
|
|
|
|
import java.awt.Color;
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.entity.monster.EntitySnowman;
|
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
|
|
|
import net.minecraft.world.biome.SpawnListEntry;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
2013-05-29 01:05:27 +00:00
|
|
|
import biomesoplenty.configuration.BOPConfiguration;
|
|
|
|
import biomesoplenty.worldgen.WorldGenIceTree;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
public class BiomeGenIcyHills extends BiomeGenBase
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
private BiomeDecoratorBOP customBiomeDecorator;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
public BiomeGenIcyHills(int par1)
|
2013-05-31 10:34:02 +00:00
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
spawnableCreatureList.clear();
|
|
|
|
topBlock = (byte)Block.blockSnow.blockID;
|
|
|
|
fillerBlock = (byte)Block.blockSnow.blockID;
|
|
|
|
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
|
|
|
customBiomeDecorator.treesPerChunk = 2;
|
|
|
|
customBiomeDecorator.flowersPerChunk = -999;
|
|
|
|
customBiomeDecorator.grassPerChunk = -999;
|
|
|
|
spawnableCreatureList.add(new SpawnListEntry(EntitySnowman.class, 30, 2, 4));
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a WorldGen appropriate for this biome.
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
|
|
|
{
|
|
|
|
return new WorldGenIceTree(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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 16777215;
|
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
|
|
|
}
|