Biome tweaks

This commit is contained in:
Matt Caughey 2013-07-04 02:04:12 -04:00
parent eb4e3fdb14
commit d73cb58325
14 changed files with 378 additions and 23 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 B

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 779 B

View file

@ -619,7 +619,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
for (var2 = 0; var2 < 5; ++var2)
{
int var9999 = randomGenerator.nextInt(32);
int var9999 = randomGenerator.nextInt(96);
if (var9999 == 1)
{
@ -640,7 +640,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
for (var2 = 0; var2 < 5; ++var2)
{
int var9998 = randomGenerator.nextInt(16);
int var9998 = randomGenerator.nextInt(32);
if (var9998 == 1)
{

View file

@ -12,8 +12,8 @@ import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.WorldGenFungi;
import biomesoplenty.worldgen.WorldGenMoss;
import biomesoplenty.worldgen.WorldGenPrairie;
import biomesoplenty.worldgen.WorldGenSwampTall;
import biomesoplenty.worldgen.WorldGenThickTree2;
import biomesoplenty.worldgen.WorldGenThickTree3;
@ -73,7 +73,7 @@ public class BiomeGenFungiForest extends BiomeGenBase
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(2) == 0 ? new WorldGenThickTree2(false) : (par1Random.nextInt(7) == 0 ? new WorldGenThickTree3(false) : (par1Random.nextInt(3) == 0 ? new WorldGenPrairie(false) : new WorldGenSwampTall()));
return par1Random.nextInt(2) == 0 ? new WorldGenThickTree2(false) : (par1Random.nextInt(7) == 0 ? new WorldGenThickTree3(false) : (par1Random.nextInt(3) == 0 ? new WorldGenFungi() : new WorldGenFungi()));
}
/**

View file

@ -24,7 +24,7 @@ public class BiomeGenHotSprings extends BiomeGenBase
customBiomeDecorator.treesPerChunk = 3;
customBiomeDecorator.grassPerChunk = -999;
customBiomeDecorator.outbackPerChunk = 5;
customBiomeDecorator.hotSpringsPerChunk = 25;
customBiomeDecorator.hotSpringsPerChunk = 8;
customBiomeDecorator.lavaLakesPerChunk = 5;
}

View file

@ -12,6 +12,7 @@ import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.WorldGenMystic1;
import biomesoplenty.worldgen.WorldGenMystic2;
import biomesoplenty.worldgen.WorldGenMystic3;
public class BiomeGenMysticGrove extends BiomeGenBase
{
@ -51,7 +52,7 @@ public class BiomeGenMysticGrove extends BiomeGenBase
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : new WorldGenMystic1(false);
return par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : new WorldGenMystic3();
}
/**

View file

@ -34,7 +34,7 @@ public class BiomeGenOasis extends BiomeGenBase
customBiomeDecorator.generateQuicksand = true;
customBiomeDecorator.waterLakesPerChunk = 10;
customBiomeDecorator.aloePerChunk = 4;
customBiomeDecorator.hotSpringsPerChunk = 2;
customBiomeDecorator.hotSpringsPerChunk = 1;
}
@Override

View file

@ -396,7 +396,6 @@ public class BOPBiomes {
addSpawnBiome(Biomes.grove);
addSpawnBiome(Biomes.heathland);
addSpawnBiome(Biomes.highland);
addSpawnBiome(Biomes.hotSprings);
addSpawnBiome(Biomes.jadeCliffs);
addSpawnBiome(Biomes.lushDesert);
addSpawnBiome(Biomes.lushSwamp);
@ -408,7 +407,6 @@ public class BOPBiomes {
addSpawnBiome(Biomes.moor);
addSpawnBiome(Biomes.mountain);
addSpawnBiome(Biomes.oasis);
addSpawnBiome(Biomes.orchard);
addSpawnBiome(Biomes.outback);
addSpawnBiome(Biomes.pasture);
addSpawnBiome(Biomes.polar);

View file

@ -505,11 +505,11 @@ public class BOPConfiguration {
biomeSize = config.get("Biomes O\' Plenty World Type Settings", "Biome Size", 4, "Default World Type has 4. Large Biomes World Type has 6.").getInt();
achievements = config.get("Miscellanious Settings", "Add Biomes O\' Plenty Achievements", true).getBoolean(false);
dungeonLoot = config.get("Miscellanious Settings", "Add Custom Dungeon Loot", true).getBoolean(false);
springWaterPickup = config.get("Miscellanious Settings", "Enable Spring Water Pickup", true).getBoolean(true);
springWaterPickup = config.get("Miscellanious Settings", "Enable Spring Water Pickup", false).getBoolean(true);
vanillaEnhanced = config.get("Biome Settings", "Enhanced Vanilla Biomes", true).getBoolean(false);
promisedLandDimID = config.get("Dimension Settings", "Promised Land Dimension ID", 20, null).getInt();
netherOverride = config.get("Dimension Settings", "Enable Nether Override", true).getBoolean(true);
rainCreatesPuddles = config.get("Miscellanious Settings", "Puddles have a chance of being spawned during the rain", true).getBoolean(true);
rainCreatesPuddles = config.get("Miscellanious Settings", "Enable Puddles During Rain", true).getBoolean(true);
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", false).getBoolean(true);

View file

@ -92,7 +92,7 @@ public class BlockFluidSpringWater extends BlockFluidClassic implements ILiquid
if (player.getFoodStats().needFood())
{
((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1));
//((EntityPlayer)entity).addPotionEffect(new PotionEffect(Potion.field_76443_y.id, 1));
}
}
}

View file

@ -76,8 +76,6 @@ public class WorldChunkManagerBOP extends WorldChunkManager
addSpawnBiomes(Biomes.meadow);
addSpawnBiomes(Biomes.mesa);
addSpawnBiomes(Biomes.mountain);
addSpawnBiomes(Biomes.oasis);
addSpawnBiomes(Biomes.orchard);
addSpawnBiomes(Biomes.pasture);
addSpawnBiomes(Biomes.prairie);
addSpawnBiomes(Biomes.quagmire);

View file

@ -91,25 +91,21 @@ public class WorldGenApple extends WorldGenerator
if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)])
{
var99 = par2Random.nextInt(15);
var99 = par2Random.nextInt(50);
if (var99 == 0)
if (var99 == 44)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 3);
}
else if (var99 == 1)
else if (var99 ==30)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 2);
}
else if (var99 == 2)
else if (var99 == 15)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 2);
}
else if (var99 == 3)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
}
else if (var99 == 4)
else if (var99 == 10)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
}
@ -117,6 +113,10 @@ public class WorldGenApple extends WorldGenerator
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
}
else if (var99 == 0)
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 1);
}
else
{
this.setBlockAndMetadata(par1World, var12, var16, var14, Blocks.leavesFruit.get().blockID, 0);

View file

@ -0,0 +1,179 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
public class WorldGenFungi extends WorldGenerator
{
@Override
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
int var6;
for (var6 = par2Random.nextInt(6) + 8; par1World.getBlockMaterial(par3, par4 - 1, par5) == Material.water; --par4)
{
;
}
boolean var7 = true;
if (par4 >= 1 && par4 + var6 + 1 <= 128)
{
int var8;
int var10;
int var11;
int var12;
for (var8 = par4; var8 <= par4 + 1 + var6; ++var8)
{
byte var9 = 1;
if (var8 == par4)
{
var9 = 0;
}
if (var8 >= par4 + 1 + var6 - 2)
{
var9 = 3;
}
for (var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10)
{
for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11)
{
if (var8 >= 0 && var8 < 128)
{
var12 = par1World.getBlockId(var10, var8, var11);
if (var12 != 0 && var12 != Block.leaves.blockID)
{
if (var12 != Block.waterStill.blockID && var12 != Block.waterMoving.blockID)
{
var7 = false;
}
else if (var8 > par4)
{
var7 = false;
}
}
}
else
{
var7 = false;
}
}
}
}
if (!var7)
return false;
else
{
var8 = par1World.getBlockId(par3, par4 - 1, par5);
if ((var8 == Block.grass.blockID || var8 == Block.dirt.blockID) && par4 < 128 - var6 - 1)
{
this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID);
int var13;
int var16;
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 2 - var10 / 8;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
var13 = var12 - par3;
for (int var14 = par5 - var11; var14 <= par5 + var11; ++var14)
{
int var15 = var14 - par5;
if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)])
{
this.setBlock(par1World, var12, var16, var14, Block.leaves.blockID);
}
}
}
}
for (var16 = 0; var16 < var6; ++var16)
{
var10 = par1World.getBlockId(par3, par4 + var16, par5);
if (var10 == 0 || var10 == Block.leaves.blockID || var10 == Block.waterMoving.blockID || var10 == Block.waterStill.blockID)
{
this.setBlock(par1World, par3, par4 + var16, par5, Block.wood.blockID);
}
}
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 2 - var10 / 8;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
for (var13 = par5 - var11; var13 <= par5 + var11; ++var13)
{
if (par1World.getBlockId(var12, var16, var13) == Block.leaves.blockID)
{
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12 - 1, var16, var13) == 0)
{
this.generateVines(par1World, var12 - 1, var16, var13, 8);
}
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12 + 1, var16, var13) == 0)
{
this.generateVines(par1World, var12 + 1, var16, var13, 2);
}
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12, var16, var13 - 1) == 0)
{
this.generateVines(par1World, var12, var16, var13 - 1, 1);
}
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12, var16, var13 + 1) == 0)
{
this.generateVines(par1World, var12, var16, var13 + 1, 4);
}
}
}
}
}
return true;
} else
return false;
}
} else
return false;
}
/**
* Generates vines at the given position until it hits a block.
*/
private void generateVines(World par1World, int par2, int par3, int par4, int par5)
{
this.setBlockAndMetadata(par1World, par2, par3, par4, Blocks.ivy.get().blockID, par5);
int var6 = 8;
while (true)
{
--par3;
if (par1World.getBlockId(par2, par3, par4) != 0 || var6 <= 0)
return;
this.setBlockAndMetadata(par1World, par2, par3, par4, Blocks.ivy.get().blockID, par5);
--var6;
}
}
}

View file

@ -0,0 +1,179 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
public class WorldGenMystic3 extends WorldGenerator
{
@Override
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
int var6;
for (var6 = par2Random.nextInt(6) + 8; par1World.getBlockMaterial(par3, par4 - 1, par5) == Material.water; --par4)
{
;
}
boolean var7 = true;
if (par4 >= 1 && par4 + var6 + 1 <= 128)
{
int var8;
int var10;
int var11;
int var12;
for (var8 = par4; var8 <= par4 + 1 + var6; ++var8)
{
byte var9 = 1;
if (var8 == par4)
{
var9 = 0;
}
if (var8 >= par4 + 1 + var6 - 2)
{
var9 = 3;
}
for (var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10)
{
for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11)
{
if (var8 >= 0 && var8 < 128)
{
var12 = par1World.getBlockId(var10, var8, var11);
if (var12 != 0 && var12 != Block.leaves.blockID)
{
if (var12 != Block.waterStill.blockID && var12 != Block.waterMoving.blockID)
{
var7 = false;
}
else if (var8 > par4)
{
var7 = false;
}
}
}
else
{
var7 = false;
}
}
}
}
if (!var7)
return false;
else
{
var8 = par1World.getBlockId(par3, par4 - 1, par5);
if ((var8 == Block.grass.blockID || var8 == Block.dirt.blockID) && par4 < 128 - var6 - 1)
{
this.setBlock(par1World, par3, par4 - 1, par5, Block.dirt.blockID);
int var13;
int var16;
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 2 - var10 / 4;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
var13 = var12 - par3;
for (int var14 = par5 - var11; var14 <= par5 + var11; ++var14)
{
int var15 = var14 - par5;
if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)])
{
this.setBlock(par1World, var12, var16, var14, Block.leaves.blockID);
}
}
}
}
for (var16 = 0; var16 < var6; ++var16)
{
var10 = par1World.getBlockId(par3, par4 + var16, par5);
if (var10 == 0 || var10 == Block.leaves.blockID || var10 == Block.waterMoving.blockID || var10 == Block.waterStill.blockID)
{
this.setBlock(par1World, par3, par4 + var16, par5, Block.wood.blockID);
}
}
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)
{
var10 = var16 - (par4 + var6);
var11 = 2 - var10 / 4;
for (var12 = par3 - var11; var12 <= par3 + var11; ++var12)
{
for (var13 = par5 - var11; var13 <= par5 + var11; ++var13)
{
if (par1World.getBlockId(var12, var16, var13) == Block.leaves.blockID)
{
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12 - 1, var16, var13) == 0)
{
this.generateVines(par1World, var12 - 1, var16, var13, 8);
}
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12 + 1, var16, var13) == 0)
{
this.generateVines(par1World, var12 + 1, var16, var13, 2);
}
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12, var16, var13 - 1) == 0)
{
this.generateVines(par1World, var12, var16, var13 - 1, 1);
}
if (par2Random.nextInt(3) == 0 && par1World.getBlockId(var12, var16, var13 + 1) == 0)
{
this.generateVines(par1World, var12, var16, var13 + 1, 4);
}
}
}
}
}
return true;
} else
return false;
}
} else
return false;
}
/**
* Generates vines at the given position until it hits a block.
*/
private void generateVines(World par1World, int par2, int par3, int par4, int par5)
{
this.setBlockAndMetadata(par1World, par2, par3, par4, Blocks.ivy.get().blockID, par5);
int var6 = 8;
while (true)
{
--par3;
if (par1World.getBlockId(par2, par3, par4) != 0 || var6 <= 0)
return;
this.setBlockAndMetadata(par1World, par2, par3, par4, Blocks.ivy.get().blockID, par5);
--var6;
}
}
}