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

87 lines
2.0 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;
import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.WorldGenDeadTree;
public class BiomeGenQuagmire extends BiomeGenBase
{
2013-05-31 10:34:02 +00:00
private BiomeDecoratorBOP customBiomeDecorator;
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
public BiomeGenQuagmire(int par1)
{
super(par1);
spawnableCreatureList.clear();
spawnableWaterCreatureList.clear();
topBlock = (byte)Blocks.mud.get().blockID;
fillerBlock = (byte)Blocks.mud.get().blockID;
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 0;
customBiomeDecorator.grassPerChunk = 10;
customBiomeDecorator.flowersPerChunk = -999;
customBiomeDecorator.sandPerChunk = -999;
customBiomeDecorator.sandPerChunk2 = -999;
waterColorMultiplier = 13390080;
customBiomeDecorator.generateQuagmire = 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 WorldGenDeadTree(false);
}
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
@Override
public int getBiomeGrassColor()
{
return 10390377;
}
2013-05-03 13:00:44 +00:00
2013-05-31 10:34:02 +00:00
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
@Override
public int getBiomeFoliageColor()
{
return 10390377;
}
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)
{
if (BOPConfiguration.skyColors = true)
return 12436670;
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;
}
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
}