2013-09-14 10:16:39 +00:00
|
|
|
package biomesoplenty.biomes.promisedland;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
|
|
|
import java.awt.Color;
|
|
|
|
import java.util.Random;
|
|
|
|
|
2013-11-09 06:30:41 +00:00
|
|
|
import worldcore.interfaces.IWCFog;
|
2013-08-07 02:03:47 +00:00
|
|
|
import net.minecraft.block.Block;
|
2013-05-29 01:05:27 +00:00
|
|
|
import net.minecraft.world.World;
|
|
|
|
import net.minecraft.world.biome.BiomeGenBase;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
2013-05-03 13:00:44 +00:00
|
|
|
import biomesoplenty.api.Blocks;
|
2013-09-14 10:16:39 +00:00
|
|
|
import biomesoplenty.biomes.BiomeDecoratorBOP;
|
|
|
|
import biomesoplenty.configuration.configfile.BOPConfigurationMisc;
|
2013-05-09 13:38:48 +00:00
|
|
|
import biomesoplenty.worldgen.WorldGenWaterSpring;
|
2013-09-14 10:16:39 +00:00
|
|
|
import biomesoplenty.worldgen.tree.WorldGenPromisedTree;
|
|
|
|
import biomesoplenty.worldgen.tree.WorldGenPromisedWillowTree;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-11-09 06:30:41 +00:00
|
|
|
public class BiomeGenPromisedLandSwamp extends BiomeGenBase implements IWCFog
|
2013-05-03 13:00:44 +00:00
|
|
|
{
|
|
|
|
private WorldGenerator theWorldGenerator;
|
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 BiomeGenPromisedLandSwamp(int par1)
|
|
|
|
{
|
|
|
|
super(par1);
|
|
|
|
theBiomeDecorator = new BiomeDecoratorBOP(this);
|
|
|
|
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
|
|
|
|
topBlock = (byte)Blocks.holyGrass.get().blockID;
|
|
|
|
fillerBlock = (byte)Blocks.holyDirt.get().blockID;
|
|
|
|
customBiomeDecorator.treesPerChunk = 12;
|
|
|
|
customBiomeDecorator.grassPerChunk = -999;
|
|
|
|
customBiomeDecorator.holyTallGrassPerChunk = 100;
|
2013-11-14 07:50:25 +00:00
|
|
|
customBiomeDecorator.promisedWillowPerChunk = 40;
|
2013-05-31 10:34:02 +00:00
|
|
|
customBiomeDecorator.pinkFlowersPerChunk = 6;
|
2013-07-24 17:27:45 +00:00
|
|
|
customBiomeDecorator.rainbowflowersPerChunk = 5;
|
2013-05-31 10:34:02 +00:00
|
|
|
customBiomeDecorator.blueMilksPerChunk = 15;
|
|
|
|
customBiomeDecorator.toadstoolsPerChunk = 10;
|
|
|
|
customBiomeDecorator.portobellosPerChunk = 5;
|
|
|
|
customBiomeDecorator.generateLakes = false;
|
|
|
|
customBiomeDecorator.pondsPerChunk = -100;
|
2013-08-07 02:03:47 +00:00
|
|
|
customBiomeDecorator.hotSpringsPerChunk = 5;
|
|
|
|
customBiomeDecorator.waterLakesPerChunk = 15;
|
2013-05-31 10:34:02 +00:00
|
|
|
customBiomeDecorator.crystalsPerChunk = 25;
|
|
|
|
customBiomeDecorator.crystals2PerChunk = 50;
|
2013-11-09 21:20:35 +00:00
|
|
|
customBiomeDecorator.cloudsPerChunk = 1;
|
2013-05-31 10:34:02 +00:00
|
|
|
spawnableCreatureList.clear();
|
|
|
|
spawnableWaterCreatureList.clear();
|
|
|
|
spawnableMonsterList.clear();
|
|
|
|
spawnableCaveCreatureList.clear();
|
|
|
|
customBiomeDecorator.generatePumpkins = false;
|
2013-11-14 07:50:25 +00:00
|
|
|
customBiomeDecorator.generateMossySkystone = true;
|
2013-11-09 21:20:35 +00:00
|
|
|
//customBiomeDecorator.generateClouds = true;
|
2013-05-08 07:53:28 +00:00
|
|
|
//this.customBiomeDecorator.generateLakes = false;
|
2013-08-07 02:03:47 +00:00
|
|
|
theWorldGenerator = new WorldGenWaterSpring(Block.waterMoving.blockID, 8);
|
2013-05-15 20:09:24 +00:00
|
|
|
/*this.spawnableMonsterList.add(new SpawnListEntry(EntityPig.class, 4, 1, 4));
|
2013-05-31 10:34:02 +00:00
|
|
|
|
2013-05-12 22:22:17 +00:00
|
|
|
if (Loader.isModLoaded("TwilightForest"))
|
|
|
|
{
|
|
|
|
try {
|
|
|
|
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFBird"), 2, 1, 3));
|
|
|
|
this.spawnableMonsterList.add(new SpawnListEntry(Class.forName("twilightforest.entity.passive.EntityTFRaven"), 1, 1, 2));
|
|
|
|
} catch (ClassNotFoundException e) {
|
|
|
|
System.out.println("[BiomesOPlenty] There was an error while integrating Twilight Forest with Biomes O' Plenty!");
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
2013-05-15 20:09:24 +00:00
|
|
|
}*/
|
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 getRandomWorldGenForTrees(Random par1Random)
|
|
|
|
{
|
2013-11-14 07:50:25 +00:00
|
|
|
return new WorldGenPromisedWillowTree();
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
2013-06-01 00:29:29 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getBiomeGrassColor()
|
|
|
|
{
|
|
|
|
return 7925125;
|
|
|
|
}
|
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()
|
|
|
|
{
|
2013-11-09 21:20:35 +00:00
|
|
|
return 7925125;
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
2013-11-09 06:30:41 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getFogColour()
|
|
|
|
{
|
2013-11-09 21:20:35 +00:00
|
|
|
return 16754234;
|
2013-11-09 06:30:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public float getFogCloseness()
|
|
|
|
{
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return 1.0F;
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public void decorate(World par1World, Random par2Random, int par3, int par4)
|
|
|
|
{
|
|
|
|
super.decorate(par1World, par2Random, par3, par4);
|
|
|
|
int var5 = 100;
|
|
|
|
int var6;
|
|
|
|
int var7;
|
|
|
|
int var8;
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
for (var5 = 0; var5 < 10; ++var5)
|
|
|
|
{
|
|
|
|
var6 = par3 + par2Random.nextInt(16);
|
|
|
|
var7 = par2Random.nextInt(60);
|
|
|
|
var8 = par4 + par2Random.nextInt(16);
|
|
|
|
theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
|
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)
|
|
|
|
{
|
2013-09-14 10:16:39 +00:00
|
|
|
if (BOPConfigurationMisc.skyColors)
|
|
|
|
return BOPConfigurationMisc.promisedLandSkyColor;
|
2013-05-31 10:34:02 +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-03 13:00:44 +00:00
|
|
|
}
|