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.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;
|
2013-05-29 01:05:27 +00:00
|
|
|
import biomesoplenty.configuration.BOPConfiguration;
|
|
|
|
import biomesoplenty.worldgen.WorldGenMystic2;
|
2013-07-04 06:04:12 +00:00
|
|
|
import biomesoplenty.worldgen.WorldGenMystic3;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
public class BiomeGenMysticGrove 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
|
|
|
@SuppressWarnings("unchecked")
|
2013-05-03 13:00:44 +00:00
|
|
|
public BiomeGenMysticGrove(int par1)
|
2013-05-31 10:34:02 +00:00
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
|
|
|
customBiomeDecorator.treesPerChunk = 8;
|
|
|
|
customBiomeDecorator.grassPerChunk = 7;
|
|
|
|
customBiomeDecorator.flowersPerChunk = 8;
|
|
|
|
customBiomeDecorator.pinkFlowersPerChunk = 6;
|
|
|
|
customBiomeDecorator.glowFlowersPerChunk = 15;
|
|
|
|
customBiomeDecorator.rosesPerChunk = 8;
|
|
|
|
customBiomeDecorator.sandPerChunk = -999;
|
|
|
|
customBiomeDecorator.sandPerChunk2 = -999;
|
|
|
|
customBiomeDecorator.sproutsPerChunk = 3;
|
|
|
|
customBiomeDecorator.hydrangeasPerChunk = 3;
|
|
|
|
customBiomeDecorator.blueMilksPerChunk = 4;
|
|
|
|
customBiomeDecorator.glowshroomsPerChunk = 2;
|
|
|
|
customBiomeDecorator.lilyflowersPerChunk = 3;
|
|
|
|
customBiomeDecorator.hotSpringsPerChunk = 2;
|
2013-06-01 21:57:41 +00:00
|
|
|
customBiomeDecorator.poisonWaterPerChunk = 1;
|
2013-05-31 10:34:02 +00:00
|
|
|
waterColorMultiplier = 15349914;
|
|
|
|
spawnableMonsterList.clear();
|
|
|
|
spawnableCreatureList.clear();
|
|
|
|
spawnableWaterCreatureList.clear();
|
|
|
|
spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
|
|
|
|
}
|
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)
|
|
|
|
{
|
2013-07-04 06:04:12 +00:00
|
|
|
return par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : new WorldGenMystic3();
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
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 getRandomWorldGenForGrass(Random par1Random)
|
|
|
|
{
|
|
|
|
return par1Random.nextInt(2) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
|
|
|
|
}
|
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 7004860;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides the basic foliage color based on the biome temperature and rainfall
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
public int getBiomeFoliageColor()
|
|
|
|
{
|
|
|
|
return 3530896;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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 16751558;
|
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
|
|
|
}
|