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

107 lines
3.1 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 biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.WorldGenMystic1;
import biomesoplenty.worldgen.WorldGenMystic2;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityWitch;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenMysticGrove extends BiomeGenBase
{
private BiomeDecoratorBOP customBiomeDecorator;
@SuppressWarnings("unchecked")
public BiomeGenMysticGrove(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
this.customBiomeDecorator.treesPerChunk = 8;
this.customBiomeDecorator.grassPerChunk = 7;
this.customBiomeDecorator.flowersPerChunk = 8;
this.customBiomeDecorator.pinkFlowersPerChunk = 6;
this.customBiomeDecorator.glowFlowersPerChunk = 15;
this.customBiomeDecorator.rosesPerChunk = 8;
this.customBiomeDecorator.sandPerChunk = -999;
this.customBiomeDecorator.sandPerChunk2 = -999;
this.customBiomeDecorator.sproutsPerChunk = 3;
this.customBiomeDecorator.hydrangeasPerChunk = 3;
this.customBiomeDecorator.blueMilksPerChunk = 4;
this.customBiomeDecorator.glowshroomsPerChunk = 2;
2013-05-15 12:49:06 +00:00
this.customBiomeDecorator.lilyflowersPerChunk = 3;
this.customBiomeDecorator.hotSpringsPerChunk = 5;
2013-05-03 13:00:44 +00:00
this.waterColorMultiplier = 15349914;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : new WorldGenMystic1(false));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
public int getBiomeGrassColor()
{
return 7004860;
}
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
public int getBiomeFoliageColor()
{
return 3530896;
}
/**
* takes temperature, returns color
*/
public int getSkyColorByTemp(float par1)
{
if (BOPConfiguration.skyColors = true)
{
return 16751558;
}
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();
}
}
}