83 lines
2 KiB
Java
83 lines
2 KiB
Java
|
package biomesoplenty.biomes;
|
||
|
|
||
|
import java.awt.Color;
|
||
|
import java.util.Random;
|
||
|
|
||
|
import biomesoplenty.api.Blocks;
|
||
|
import biomesoplenty.configuration.BOPBlocks;
|
||
|
import biomesoplenty.configuration.BOPConfiguration;
|
||
|
import biomesoplenty.worldgen.WorldGenOriginTree;
|
||
|
|
||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||
|
|
||
|
public class BiomeGenOriginValley extends BiomeGenBase
|
||
|
{
|
||
|
private BiomeDecoratorBOP customBiomeDecorator;
|
||
|
|
||
|
public BiomeGenOriginValley(int par1)
|
||
|
{
|
||
|
super(par1);
|
||
|
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
|
||
|
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
||
|
this.topBlock = (byte)Blocks.originGrass.get().blockID;
|
||
|
this.customBiomeDecorator.treesPerChunk = 4;
|
||
|
this.customBiomeDecorator.grassPerChunk = -999;
|
||
|
this.customBiomeDecorator.generatePumpkins = false;
|
||
|
this.customBiomeDecorator.sandPerChunk = 0;
|
||
|
this.customBiomeDecorator.sandPerChunk2 = 0;
|
||
|
this.customBiomeDecorator.clayPerChunk = 0;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gets a WorldGen appropriate for this biome.
|
||
|
*/
|
||
|
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||
|
{
|
||
|
return new WorldGenOriginTree(false);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Provides the basic grass color based on the biome temperature and rainfall
|
||
|
*/
|
||
|
public int getBiomeGrassColor()
|
||
|
{
|
||
|
return 10682207;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Provides the basic foliage color based on the biome temperature and rainfall
|
||
|
*/
|
||
|
public int getBiomeFoliageColor()
|
||
|
{
|
||
|
return 3866368;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* takes temperature, returns color
|
||
|
*/
|
||
|
public int getSkyColorByTemp(float par1)
|
||
|
{
|
||
|
if (BOPConfiguration.skyColors = true)
|
||
|
{
|
||
|
return 8703228;
|
||
|
}
|
||
|
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();
|
||
|
}
|
||
|
}
|
||
|
}
|