Reorganized biomes

This commit is contained in:
GotoLink 2013-10-26 23:18:36 +02:00
commit 11d127d266
6 changed files with 30 additions and 130 deletions

View file

@ -1,25 +1,25 @@
package mysticworld.biome;
import java.util.Random;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenBasic extends BiomeGenBase {
public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
public BiomeGenBasic(int id, int blockTop, int blockFiller) {
super(id);
this.topBlock = (byte) blockTop;
this.fillerBlock = (byte) blockFiller;
}
public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk) {
super(id);
this.theBiomeDecorator.treesPerChunk = treesChunk;
this.theBiomeDecorator.grassPerChunk = grassChunk;
this.theBiomeDecorator.flowersPerChunk = flowerChunk;
this.theBiomeDecorator.reedsPerChunk = reedsChunk;;
this.theBiomeDecorator.reedsPerChunk = reedsChunk;
}
}
public BiomeGenBasic(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
this(id, treesChunk, grassChunk, flowerChunk, reedsChunk);
this.topBlock = (byte) blockTop;
this.fillerBlock = (byte) blockFiller;
}
}

View file

@ -1,29 +1,8 @@
package mysticworld.biome;
import java.util.Random;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenGlacier extends BiomeGenBase {
public class BiomeGenGlacier extends BiomeGenTundra {
public BiomeGenGlacier(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
super(id);
this.topBlock = (byte) blockTop;
this.fillerBlock = (byte) blockFiller;
this.theBiomeDecorator.treesPerChunk = treesChunk;
this.theBiomeDecorator.grassPerChunk = grassChunk;
this.theBiomeDecorator.flowersPerChunk = flowerChunk;
this.theBiomeDecorator.reedsPerChunk = reedsChunk;;
this.spawnableCreatureList.clear();
this.spawnableMonsterList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(net.minecraft.entity.passive.EntityWolf.class, 5, 4, 4));
this.waterColorMultiplier = 15397370;
}
super(id, treesChunk, grassChunk, flowerChunk, reedsChunk, blockTop, blockFiller);
this.waterColorMultiplier = 15397370;
}
}

View file

@ -1,58 +1,18 @@
package mysticworld.biome;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenHugeTrees;
import net.minecraft.world.gen.feature.WorldGenShrub;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenVines;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenJungle extends BiomeGenBase
{
public BiomeGenJungle(int par1)
{
super(par1);
this.theBiomeDecorator.treesPerChunk = 50;
this.theBiomeDecorator.grassPerChunk = 25;
this.theBiomeDecorator.flowersPerChunk = 4;
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
this.spawnableCreatureList.add(new SpawnListEntry(EntityChicken.class, 10, 4, 4));
}
public class BiomeGenJungle extends net.minecraft.world.biome.BiomeGenJungle {
public BiomeGenJungle(int par1) {
super(par1);
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return (WorldGenerator)(par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenHugeTrees(false, 10 + par1Random.nextInt(20), 3, 3) : new WorldGenTrees(false, 4 + par1Random.nextInt(7), 3, 3, true)));
}
/**
* Gets a WorldGen appropriate for this biome.
*/
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenTallGrass(Block.tallGrass.blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1);
}
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
super.decorate(par1World, par2Random, par3, par4);
WorldGenVines worldgenvines = new WorldGenVines();
for (int k = 0; k < 50; ++k)
{
int l = par3 + par2Random.nextInt(16) + 8;
byte b0 = 64;
int i1 = par4 + par2Random.nextInt(16) + 8;
worldgenvines.generate(par1World, par2Random, l, b0, i1);
}
}
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random) {
return par1Random.nextInt(10) == 0 ? this.worldGeneratorBigTree : (par1Random.nextInt(2) == 0 ? new WorldGenHugeTrees(false, 10 + par1Random.nextInt(20), 3, 3) : new WorldGenTrees(false,
4 + par1Random.nextInt(7), 3, 3, true));
}
}

View file

@ -1,23 +0,0 @@
package mysticworld.biome;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenMountain extends BiomeGenBase {
public BiomeGenMountain(int id, int blockTop, int blockFiller)
{
super(id);
this.topBlock = (byte) blockTop;
this.fillerBlock = (byte) blockFiller;
}
}

View file

@ -1,28 +1,13 @@
package mysticworld.biome;
import java.util.Random;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityGiantZombie;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenerator;
public class BiomeGenTundra extends BiomeGenBase {
public class BiomeGenTundra extends BiomeGenBasic {
public BiomeGenTundra(int id, int treesChunk, int grassChunk, int flowerChunk, int reedsChunk, int blockTop, int blockFiller) {
super(id);
this.topBlock = (byte) blockTop;
this.fillerBlock = (byte) blockFiller;
this.theBiomeDecorator.treesPerChunk = treesChunk;
this.theBiomeDecorator.grassPerChunk = grassChunk;
this.theBiomeDecorator.flowersPerChunk = flowerChunk;
this.theBiomeDecorator.reedsPerChunk = reedsChunk;;
super(id, treesChunk, grassChunk, flowerChunk, reedsChunk, blockTop, blockFiller);
this.spawnableCreatureList.clear();
this.spawnableMonsterList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableCreatureList.add(new SpawnListEntry(net.minecraft.entity.passive.EntityWolf.class, 5, 4, 4));
}
this.spawnableCreatureList.add(new SpawnListEntry(net.minecraft.entity.passive.EntityWolf.class, 5, 4, 4));
}
}

View file

@ -19,7 +19,7 @@ public class BiomeHandler {
}
public static void initializeBiomes() {
Mountain = new BiomeGenMountain(23, Block.stone.blockID, Block.stone.blockID).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
Mountain = new BiomeGenBasic(23, Block.stone.blockID, Block.stone.blockID).setColor(9286496).setBiomeName("Mountain").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
.setMinMaxHeight(0.5F, 1.0F);
Tundra = new BiomeGenTundra(24, 0, 0, 0, 0, Block.blockSnow.blockID, Block.blockSnow.blockID).setColor(9286496).setBiomeName("Tundra").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
.setMinMaxHeight(0.8F, 0.4F);
@ -27,7 +27,6 @@ public class BiomeHandler {
Glacier = new BiomeGenGlacier(26, 0, 0, 0, 0, Block.ice.blockID, Block.ice.blockID).setColor(9474208).setBiomeName("Glacier").setEnableSnow().setTemperatureRainfall(0.05F, 0.8F)
.setMinMaxHeight(0.5F, 0.7F);
Jungle = new BiomeGenJungle(27).setColor(5470985).setBiomeName("Jungle").func_76733_a(5470985).setTemperatureRainfall(1.2F, 0.9F).setMinMaxHeight(0.2F, 0.4F);
;
}
public static void registerBiomes() {