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

78 lines
2.5 KiB
Java
Raw Normal View History

package biomesoplenty.biomes;
2013-05-18 22:23:21 +00:00
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityMagmaCube;
import net.minecraft.entity.monster.EntityPigZombie;
2013-05-18 22:23:21 +00:00
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
2013-05-21 20:35:04 +00:00
import net.minecraft.world.gen.feature.WorldGenFire;
import net.minecraft.world.gen.feature.WorldGenerator;
2013-09-07 15:22:54 +00:00
import biomesoplenty.worldgen.WorldGenGrave;
import biomesoplenty.worldgen.WorldGenLavaSpring;
public class BiomeGenNetherLava extends BiomeGenBase
{
2013-05-18 22:23:21 +00:00
private WorldGenerator theWorldGenerator;
private BiomeDecoratorBOP customBiomeDecorator;
2013-05-18 22:23:21 +00:00
2013-05-31 10:34:02 +00:00
public BiomeGenNetherLava(int par1)
{
super(par1);
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
topBlock = (byte)Block.netherrack.blockID;
fillerBlock = (byte)Block.netherrack.blockID;
customBiomeDecorator.grassPerChunk = 8;
customBiomeDecorator.netherLavaPerChunk = 20;
customBiomeDecorator.smolderingGrassPerChunk = 2;
customBiomeDecorator.generateAsh = true;
spawnableMonsterList.clear();
spawnableCreatureList.clear();
spawnableWaterCreatureList.clear();
spawnableCaveCreatureList.clear();
spawnableMonsterList.add(new SpawnListEntry(EntityGhast.class, 50, 4, 4));
spawnableMonsterList.add(new SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
spawnableMonsterList.add(new SpawnListEntry(EntityMagmaCube.class, 4, 4, 4));
theWorldGenerator = new WorldGenLavaSpring(Block.lavaMoving.blockID, 4);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
@Override
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return new WorldGenFire();
}
@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;
for (var5 = 0; var5 < 3; ++var5)
{
var6 = par3 + par2Random.nextInt(16);
var7 = 64 + par2Random.nextInt(64);
var8 = par4 + par2Random.nextInt(16);
theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
}
2013-09-07 15:22:54 +00:00
if (par2Random.nextInt(15) == 0)
{
int var55 = par3 + par2Random.nextInt(16) + 8;
int var66 = par4 + par2Random.nextInt(16) + 8;
WorldGenGrave var77 = new WorldGenGrave();
var77.generate(par1World, par2Random, var55, par1World.getHeightValue(var55, var66) + 1, var66);
}
2013-05-31 10:34:02 +00:00
}
}