Readded the Mountain biome

This commit is contained in:
Adubbz 2014-01-06 00:03:01 +11:00
parent 61128890b9
commit 0b12d2628a
9 changed files with 105 additions and 99 deletions

View file

@ -1,54 +1,72 @@
package biomesoplenty.common.biomes;
import net.minecraft.world.biome.BiomeGenBase;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase.Height;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.world.features.trees.WorldGenPineTree;
public class BiomeGenMountain extends BOPBiome
{
private static final Height biomeHeight = new Height(1.0F, 1.5F);
public BiomeGenMountain(int par1)
public BiomeGenMountain(int id)
{
super(par1);
/*
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 2;
customBiomeDecorator.grassPerChunk = 3;
customBiomeDecorator.wheatGrassPerChunk = 1;
customBiomeDecorator.berryBushesPerChunk = 3;
customBiomeDecorator.shrubsPerChunk = 10;
customBiomeDecorator.waterReedsPerChunk = 4;
*/
}
super(id);
/**
* Gets a WorldGen appropriate for this biome.
*/
/*
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenPineTree() : worldGeneratorTrees;
//TODO: setHeight()
this.func_150570_a(biomeHeight);
//TODO: setColor()
this.setColor(8430421);
this.setTemperatureRainfall(0.5F, 0.1F);
this.theBiomeDecorator.treesPerChunk = 2;
this.theBiomeDecorator.grassPerChunk = 3;
this.bopWorldFeatures.perChunk.berryBushesPerChunk = 3;
this.bopWorldFeatures.perChunk.shrubsPerChunk = 10;
this.bopWorldFeatures.perChunk.waterReedsPerChunk = 4;
}
@Override
public void decorate(World par1World, Random par2Random, int par3, int par4)
//TODO: getRandomWorldGenForTrees()
public WorldGenAbstractTree func_150567_a(Random random)
{
super.decorate(par1World, par2Random, par3, par4);
int var5 = 3 + par2Random.nextInt(6);
return random.nextInt(4) == 0 ? new WorldGenPineTree() : worldGeneratorTrees;
}
@Override
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
return random.nextInt(4) == 0 ? (random.nextInt(2) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10) : new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11)) : new WorldGenTallGrass(Blocks.tallgrass, 1);
}
@Override
public void decorate(World world, Random random, int chunkX, int chunkZ)
{
super.decorate(world, random, chunkX, chunkZ);
int var5 = 12 + random.nextInt(6);
for (int var6 = 0; var6 < var5; ++var6)
{
int var7 = par3 + par2Random.nextInt(16);
int var8 = par2Random.nextInt(28) + 4;
int var9 = par4 + par2Random.nextInt(16);
int var10 = par1World.getBlockId(var7, var8, var9);
int x = chunkX + random.nextInt(16);
int y = random.nextInt(28) + 4;
int z = chunkZ + random.nextInt(16);
Block block = Block.blocksList[var10];
if (block != null && block.isGenMineableReplaceable(par1World, var7, var8, var9, Block.stone.blockID))
//TODO: getBlock()
Block block = world.func_147439_a(x, y, z);
if (block != null && block.isReplaceableOreGen(world, x, y, z, Blocks.stone))
{
par1World.setBlock(var7, var8, var9, Block.oreEmerald.blockID, 0, 2);
//TODO: setBlock()
world.func_147465_d(x, y, z, BOPBlockHelper.get("gemOre"), 0, 2);
}
}
}
*/
}

View file

@ -1,92 +1,74 @@
package biomesoplenty.common.biomes;
import net.minecraft.world.biome.BiomeGenBase;
import java.util.Random;
import net.minecraft.entity.monster.EntityWitch;
import net.minecraft.init.Blocks;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.BOPBlockHelper;
import biomesoplenty.common.world.features.trees.WorldGenOriginalTree;
public class BiomeGenMysticGrove extends BOPBiome
{
@SuppressWarnings("unchecked")
public BiomeGenMysticGrove(int par1)
public BiomeGenMysticGrove(int id)
{
super(par1);
/*
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
if (BOPConfigurationMain.realisticTrees)
{
customBiomeDecorator.treesPerChunk = 1;
}
else
{
customBiomeDecorator.treesPerChunk = 9;
}
super(id);
customBiomeDecorator.grassPerChunk = 15;
customBiomeDecorator.wheatGrassPerChunk = 3;
this.spawnableMonsterList.clear();
this.spawnableCreatureList.clear();
this.spawnableWaterCreatureList.clear();
this.spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
this.waterColorMultiplier = 16715898;
this.theBiomeDecorator.treesPerChunk = 9;
this.theBiomeDecorator.grassPerChunk = 15;
this.theBiomeDecorator.sandPerChunk = -999;
this.theBiomeDecorator.sandPerChunk2 = -999;
/*customBiomeDecorator.rosesPerChunk = 8;
customBiomeDecorator.flowersPerChunk = 8;
customBiomeDecorator.pinkFlowersPerChunk = 9;
customBiomeDecorator.glowFlowersPerChunk = 10;
customBiomeDecorator.rosesPerChunk = 8;
customBiomeDecorator.sandPerChunk = -999;
customBiomeDecorator.sandPerChunk2 = -999;
customBiomeDecorator.sproutsPerChunk = 1;
customBiomeDecorator.hydrangeasPerChunk = 6;
customBiomeDecorator.blueMilksPerChunk = 1;
customBiomeDecorator.lilyflowersPerChunk = 3;
customBiomeDecorator.poisonWaterPerChunk = 1;
customBiomeDecorator.cloverPatchesPerChunk = 10;
customBiomeDecorator.shrubsPerChunk = 4;
waterColorMultiplier = 16715898;
spawnableMonsterList.clear();
spawnableCreatureList.clear();
spawnableWaterCreatureList.clear();
spawnableMonsterList.add(new SpawnListEntry(EntityWitch.class, 10, 4, 4));
*/
customBiomeDecorator.poisonWaterPerChunk = 1;*/
this.bopWorldFeatures.perChunk.cloverPatchesPerChunk = 10;
this.bopWorldFeatures.perChunk.shrubsPerChunk = 4;
}
/**
* Gets a WorldGen appropriate for this biome.
*/
/*
@Override
/*@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(4) == 0 ? new WorldGenMystic2(false) : (par1Random.nextInt(3) == 0 ? new WorldGenJacaranda(false) : ((par1Random.nextInt(3) == 0 ? this.worldGeneratorBigTree : ((par1Random.nextInt(8) == 0 ? new WorldGenSwampTall() : this.worldGeneratorTrees)))));
}
*/
return par1Random.nextInt(4) == 0 ? new WorldGenMystic2(false) : (par1Random.nextInt(3) == 0 ? new WorldGenOriginalTree(BOPBlockHelper.get("logs4"), BOPBlockHelper.get("leaves4"), 2, 1) : ((par1Random.nextInt(3) == 0 ? this.worldGeneratorBigTree : ((par1Random.nextInt(8) == 0 ? new WorldGenSwampTree(Blocks.log, Blocks.leaves, 0, 0, 6, 8) : this.worldGeneratorTrees)))));
}*/
/**
* Gets a WorldGen appropriate for this biome.
*/
/*
@Override
public WorldGenerator getRandomWorldGenForGrass(Random par1Random)
{
return (par1Random.nextInt(5) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 1) : (par1Random.nextInt(3) == 0 ? new WorldGenTallGrass(Blocks.foliage.get().blockID, 2) : new WorldGenTallGrass(Block.tallGrass.blockID, 1)));
}
*/
/**
* Provides the basic grass color based on the biome temperature and rainfall
*/
/*
@Override
public int getBiomeGrassColor()
public WorldGenerator getRandomWorldGenForGrass(Random random)
{
return (random.nextInt(5) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 1) : (random.nextInt(3) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 2) : (random.nextInt(2) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 10) : (random.nextInt(2) == 0 ? new WorldGenTallGrass(BOPBlockHelper.get("foliage"), 11) : new WorldGenTallGrass(Blocks.tallgrass, 1)))));
}
@Override
//TODO: getBiomeGrassColor()
public int func_150558_b(int p_150558_1_, int p_150558_2_, int p_150558_3_)
{
return 6934491;
}
*/
/**
* Provides the basic foliage color based on the biome temperature and rainfall
*/
/*
@Override
public int getBiomeFoliageColor()
//TODO: getBiomeFoliageColor()
public int func_150571_c(int x, int y, int z)
{
return 7397529;
}
*/
/**
* Fog Color

View file

@ -59,7 +59,7 @@ public class BiomeGenOminousWoods extends BOPBiome
//TODO: getRandomWorldGenForTrees()
public WorldGenAbstractTree func_150567_a(Random random)
{
return random.nextInt(2) == 0 ? new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, false, 14, 6) : (random.nextInt(6) == 0 ? new WorldGenDeadTree1(false, Blocks.dirt, Blocks.grass, BOPBlockHelper.get("holyGrass"), BOPBlockHelper.get("driedDirt"), BOPBlockHelper.get("redRock")) : new WorldGenBOPSwampTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3));
return random.nextInt(2) == 0 ? new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, false, 14, 6) : (random.nextInt(6) == 0 ? new WorldGenDeadTree1(false, Blocks.dirt, Blocks.grass, BOPBlockHelper.get("holyGrass"), BOPBlockHelper.get("driedDirt"), BOPBlockHelper.get("redRock")) : new WorldGenBOPSwampTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, 5, 4));
}
@Override

View file

@ -9,8 +9,6 @@ public class BiomeGenPrairie extends BOPBiome
{
super(par1);
/*
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 1;
customBiomeDecorator.grassPerChunk = 999;
customBiomeDecorator.whiteFlowersPerChunk = 20;
@ -18,7 +16,6 @@ public class BiomeGenPrairie extends BOPBiome
customBiomeDecorator.portobellosPerChunk = 2;
customBiomeDecorator.berryBushesPerChunk = 2;
customBiomeDecorator.wheatGrassPerChunk = 25;
customBiomeDecorator.carrotsPerChunk = 1;
customBiomeDecorator.shrubsPerChunk = 3;
customBiomeDecorator.waterReedsPerChunk = 4;
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));

View file

@ -160,7 +160,7 @@ public class BlockBOPSapling extends BlockSapling
rnd = random.nextInt(8);
if (rnd == 0) {
obj = new WorldGenBOPSwampTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3);
obj = new WorldGenBOPSwampTree(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, 5, 4);
} else {
obj = new WorldGenBOPTaiga2(BOPBlockHelper.get("logs1"), BOPBlockHelper.get("leaves1"), 2, 3, false, 14, 6);
}

View file

@ -14,6 +14,7 @@ import biomesoplenty.common.biomes.BiomeGenFrostForest;
import biomesoplenty.common.biomes.BiomeGenHighland;
import biomesoplenty.common.biomes.BiomeGenJadeCliffs;
import biomesoplenty.common.biomes.BiomeGenLavenderFields;
import biomesoplenty.common.biomes.BiomeGenMountain;
import biomesoplenty.common.biomes.BiomeGenOminousWoods;
import biomesoplenty.common.biomes.BiomeGenPasture;
import biomesoplenty.common.biomes.BiomeGenRainforest;
@ -92,15 +93,15 @@ public class BOPBiomes
registerBiome(new BOPBiomeListEntry(new BiomeGenMapleWoods(BOPConfigurationIDs.mapleWoodsID).setBiomeName("Maple Woods"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenMarsh(BOPConfigurationIDs.marshID).setBiomeName("Marsh"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenMeadow(BOPConfigurationIDs.meadowID).setBiomeName("Meadow"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenMoor(BOPConfigurationIDs.moorID).setBiomeName("Moor"), BOPBiomeTemperatureType.COOL));
registerBiome(new BOPBiomeListEntry(new BiomeGenMoor(BOPConfigurationIDs.moorID).setBiomeName("Moor"), BOPBiomeTemperatureType.COOL));*/
registerBiome(new BOPBiomeListEntry(new BiomeGenMountain(BOPConfigurationIDs.mountainID).setBiomeName("Mountain"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenMysticGrove(BOPConfigurationIDs.mysticGroveID).setBiomeName("Mystic Grove"), BOPBiomeTemperatureType.WARM));*/
//registerBiome(new BOPBiomeListEntry(new BiomeGenMysticGrove(BOPConfigurationIDs.mysticGroveID).setBiomeName("Mystic Grove"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenOminousWoods(BOPConfigurationIDs.ominousWoodsID).setBiomeName("Ominous Woods"), BOPBiomeTemperatureType.COOL));
//registerBiome(new BOPBiomeListEntry(new BiomeGenOriginValley(BOPConfigurationIDs.originValleyID).setBiomeName("Origin Valley"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenOutback(BOPConfigurationIDs.outbackID).setBiomeName("Outback"), BOPBiomeTemperatureType.HOT));*/
registerBiome(new BOPBiomeListEntry(new BiomeGenPasture(BOPConfigurationIDs.pastureID).setBiomeName("Pasture"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenPrairie(BOPConfigurationIDs.prairieID).setBiomeName("Prairie"), BOPBiomeTemperatureType.WARM));
registerBiome(new BOPBiomeListEntry(new BiomeGenQuagmire(BOPConfigurationIDs.quagmireID).setBiomeName("Quagmire"), BOPBiomeTemperatureType.WARM));*/
//registerBiome(new BOPBiomeListEntry(new BiomeGenPrairie(BOPConfigurationIDs.prairieID).setBiomeName("Prairie"), BOPBiomeTemperatureType.WARM));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenQuagmire(BOPConfigurationIDs.quagmireID).setBiomeName("Quagmire"), BOPBiomeTemperatureType.WARM));*/
registerBiome(new BOPBiomeListEntry(new BiomeGenRainforest(BOPConfigurationIDs.rainforestID).setBiomeName("Rainforest"), BOPBiomeTemperatureType.HOT));
/*registerBiome(new BOPBiomeListEntry(new BiomeGenRedwoodForest(BOPConfigurationIDs.redwoodForestID).setBiomeName("Redwood Forest"), BOPBiomeTemperatureType.WARM));*/
registerBiome(new BOPBiomeListEntry(new BiomeGenSacredSprings(BOPConfigurationIDs.sacredSpringsID).setBiomeName("Sacred Springs"), BOPBiomeTemperatureType.WARM));

View file

@ -36,6 +36,7 @@ public class WorldGenFieldAssociation
associateField("waterReedsPerChunk", new WorldGenWaterReeds());
associateField("wildCarrotsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("plants"), 11));
associateField("poisonIvyPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 7));
associateField("berryBushesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 8));
WorldGenDoublePlant doubleTallGrass = new WorldGenDoublePlant();
//TODO: setMetadata() ?

View file

@ -22,6 +22,7 @@ public class BOPWorldFeatures
public int wildCarrotsPerChunk = 0;
public int doubleTallGrassPerChunk = 0;
public int poisonIvyPerChunk = 0;
public int berryBushesPerChunk = 0;
public int bopFlowersPerChunk = 0;
}

View file

@ -18,7 +18,10 @@ public class WorldGenBOPSwampTree extends WorldGenAbstractTree
private int woodMeta;
private int leavesMeta;
public WorldGenBOPSwampTree(Block wood, Block leaves, int woodMeta, int leavesMeta)
private int minTreeHeight;
private int randomTreeHeight;
public WorldGenBOPSwampTree(Block wood, Block leaves, int woodMeta, int leavesMeta, int minTreeHeight, int randomTreeHeight)
{
super(false);
@ -27,6 +30,9 @@ public class WorldGenBOPSwampTree extends WorldGenAbstractTree
this.woodMeta = woodMeta;
this.leavesMeta = leavesMeta;
this.minTreeHeight = minTreeHeight;
this.randomTreeHeight = randomTreeHeight;
}
@Override