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

67 lines
2.4 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;
import biomesoplenty.worldgen.WorldGenLavaSpring;
public class BiomeGenNetherLava extends BiomeGenBase
{
2013-05-18 22:23:21 +00:00
private WorldGenerator theWorldGenerator;
private BiomeDecoratorBOP customBiomeDecorator;
public BiomeGenNetherLava(int par1)
{
super(par1);
this.theBiomeDecorator = new BiomeDecoratorBOP(this);
this.customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
2013-05-18 22:23:21 +00:00
this.topBlock = (byte)Block.netherrack.blockID;
this.fillerBlock = (byte)Block.netherrack.blockID;
2013-05-21 20:35:04 +00:00
this.customBiomeDecorator.grassPerChunk = 8;
2013-05-20 14:41:19 +00:00
this.customBiomeDecorator.netherLavaPerChunk = 20;
this.customBiomeDecorator.smolderingGrassPerChunk = 2;
2013-05-21 00:49:30 +00:00
this.customBiomeDecorator.generateAsh = true;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCaveCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityGhast.class, 50, 4, 4));
this.spawnableMonsterList.add(new SpawnListEntry(EntityPigZombie.class, 100, 4, 4));
2013-05-20 14:41:19 +00:00
this.spawnableMonsterList.add(new SpawnListEntry(EntityMagmaCube.class, 4, 4, 4));
2013-05-31 00:58:03 +00:00
this.theWorldGenerator = new WorldGenLavaSpring(Block.lavaMoving.blockID, 4);
2013-05-18 22:23:21 +00:00
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
2013-05-21 20:35:04 +00:00
return new WorldGenFire();
2013-05-18 22:23:21 +00:00
}
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-31 00:58:03 +00:00
for (var5 = 0; var5 < 3; ++var5)
2013-05-18 22:23:21 +00:00
{
var6 = par3 + par2Random.nextInt(16);
var7 = 64 + par2Random.nextInt(64);
var8 = par4 + par2Random.nextInt(16);
this.theWorldGenerator.generate(par1World, par2Random, var6, var7, var8);
}
}
}