Tweaked the Badlands and Mystic Grove

This commit is contained in:
Matt Caughey 2013-07-05 01:21:10 -04:00
parent 499dadffa9
commit db44da4c7a
8 changed files with 362 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 311 B

View file

@ -46,6 +46,10 @@ import biomesoplenty.api.Blocks;
import biomesoplenty.api.Liquids;
import biomesoplenty.worldgen.WorldGenAlgae;
import biomesoplenty.worldgen.WorldGenAsh;
import biomesoplenty.worldgen.WorldGenBadlands;
import biomesoplenty.worldgen.WorldGenBadlands2;
import biomesoplenty.worldgen.WorldGenBadlands3;
import biomesoplenty.worldgen.WorldGenBadlands4;
import biomesoplenty.worldgen.WorldGenBOPFlowers;
import biomesoplenty.worldgen.WorldGenBoneSpine;
import biomesoplenty.worldgen.WorldGenBoneSpine2;
@ -128,7 +132,10 @@ public class BiomeDecoratorBOP extends BiomeDecorator
protected WorldGenerator stoneInGrassGen2;
protected WorldGenerator sandInStoneGen;
protected WorldGenerator driedDirtInSandGen;
protected WorldGenerator clayInClayGen;
protected WorldGenerator clayInClay2Gen;
protected WorldGenerator clayInStoneGen;
protected WorldGenerator clayInStone2Gen;
protected WorldGenerator quagmireGen;
protected WorldGenerator quicksandGen;
protected WorldGenerator canyonGen;
@ -353,7 +360,10 @@ public class BiomeDecoratorBOP extends BiomeDecorator
public boolean generateStoneInGrass2;
public boolean generateSandInStone;
public boolean generateDriedDirtInSand;
public boolean generateClayInClay;
public boolean generateClayInClay2;
public boolean generateClayInStone;
public boolean generateClayInStone2;
public boolean generatePits;
public boolean generateQuagmire;
public boolean generateCanyon;
@ -381,7 +391,10 @@ public class BiomeDecoratorBOP extends BiomeDecorator
stoneInGrassGen = new WorldGenMycelium(Block.stone.blockID, 32);
stoneInGrassGen2 = new WorldGenShield(Block.stone.blockID, 48);
sandInStoneGen = new WorldGenMinable(Block.sand.blockID, 32);
clayInStoneGen = new WorldGenMinable(Block.blockClay.blockID, 32);
clayInClayGen = new WorldGenBadlands2(Block.field_111039_cA.blockID, 32);
clayInClay2Gen = new WorldGenBadlands4(Block.blockClay.blockID, 32);
clayInStoneGen = new WorldGenBadlands3(Block.field_111039_cA.blockID, 32);
clayInStone2Gen = new WorldGenBadlands(Block.field_111039_cA.blockID, 32);
quagmireGen = new WorldGenQuagmire(Block.grass.blockID, 48);
quicksandGen = new WorldGenQuicksand(Blocks.mud.get().blockID, 24);
canyonGen = new WorldGenCanyon(Blocks.redRock.get().blockID, 48);
@ -532,7 +545,10 @@ public class BiomeDecoratorBOP extends BiomeDecorator
generateStoneInGrass2 = false;
generateSandInStone = false;
generateDriedDirtInSand = false;
generateClayInClay = false;
generateClayInClay2 = false;
generateClayInStone = false;
generateClayInStone2 = false;
generateQuagmire = false;
generateCanyon = false;
generatePumpkins = true;
@ -696,9 +712,24 @@ public class BiomeDecoratorBOP extends BiomeDecorator
this.genStandardOre1(8, driedDirtInSandGen, 64, 128);
}
if (generateClayInClay)
{
this.genStandardOre1(20, clayInClayGen, 64, 128);
}
if (generateClayInClay2)
{
this.genStandardOre1(10, clayInClay2Gen, 64, 128);
}
if (generateClayInStone)
{
this.genStandardOre1(15, clayInStoneGen, 64, 128);
this.genStandardOre1(10, clayInStoneGen, 64, 128);
}
if (generateClayInStone2)
{
this.genStandardOre1(20, clayInStone2Gen, 64, 128);
}
if (generateQuagmire)

View file

@ -18,7 +18,7 @@ public class BiomeGenBadlands extends BiomeGenBase
super(par1);
spawnableCreatureList.clear();
topBlock = (byte)Block.field_111032_cD.blockID;
fillerBlock = (byte)Block.blockClay.blockID;
fillerBlock = (byte)Block.field_111032_cD.blockID;
theBiomeDecorator = new BiomeDecoratorBOP(this);
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = -999;
@ -26,8 +26,10 @@ public class BiomeGenBadlands extends BiomeGenBase
customBiomeDecorator.reedsPerChunk = -999;
customBiomeDecorator.cactiPerChunk = 2;
customBiomeDecorator.clayPerChunk = 3;
customBiomeDecorator.generateClayInClay = true;
customBiomeDecorator.generateClayInClay2 = true;
customBiomeDecorator.generateClayInStone = true;
customBiomeDecorator.generateSandInStone = true;
customBiomeDecorator.generateClayInStone2 = true;
}
@Override

View file

@ -10,8 +10,10 @@ import net.minecraft.world.biome.SpawnListEntry;
import net.minecraft.world.gen.feature.WorldGenTallGrass;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.WorldGenMystic1;
import biomesoplenty.worldgen.WorldGenMystic2;
import biomesoplenty.worldgen.WorldGenMystic3;
import biomesoplenty.worldgen.WorldGenSwampTall;
public class BiomeGenMysticGrove extends BiomeGenBase
{
@ -51,7 +53,7 @@ public class BiomeGenMysticGrove extends BiomeGenBase
@Override
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
{
return par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : new WorldGenMystic3();
return par1Random.nextInt(5) == 0 ? new WorldGenMystic2(false) : (par1Random.nextInt(7) == 0 ? new WorldGenSwampTall() : new WorldGenMystic1(false));
}
/**
@ -69,7 +71,7 @@ public class BiomeGenMysticGrove extends BiomeGenBase
@Override
public int getBiomeGrassColor()
{
return 7004860;
return 6934491;
}
/**
@ -78,7 +80,7 @@ public class BiomeGenMysticGrove extends BiomeGenBase
@Override
public int getBiomeFoliageColor()
{
return 3530896;
return 7332553;
}
/**

View file

@ -0,0 +1,80 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
public class WorldGenBadlands extends WorldGenerator
{
/** The block ID of the ore to be placed using this generator. */
private int minableBlockId;
/** The number of blocks to generate. */
private int numberOfBlocks;
public WorldGenBadlands(int par1, int par2)
{
minableBlockId = par1;
numberOfBlocks = par2;
}
@Override
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float)Math.PI;
double var7 = par3 + 8 + MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var9 = par3 + 8 - MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var11 = par5 + 8 + MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var13 = par5 + 8 - MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var15 = par4 + par2Random.nextInt(3) - 2;
double var17 = par4 + par2Random.nextInt(3) - 2;
for (int var19 = 0; var19 <= numberOfBlocks; ++var19)
{
double var20 = var7 + (var9 - var7) * var19 / numberOfBlocks;
double var22 = var15 + (var17 - var15) * var19 / numberOfBlocks;
double var24 = var11 + (var13 - var11) * var19 / numberOfBlocks;
double var26 = par2Random.nextDouble() * numberOfBlocks / 16.0D;
double var28 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
double var30 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
for (int var38 = var32; var38 <= var35; ++var38)
{
double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
if (var39 * var39 < 1.0D)
{
for (int var41 = var33; var41 <= var36; ++var41)
{
double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
if (var39 * var39 + var42 * var42 < 1.0D)
{
for (int var44 = var34; var44 <= var37; ++var44)
{
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Block.field_111032_cD.blockID || par1World.getBlockId(var38, var41, var44) == Blocks.holyGrass.get().blockID)
{
par1World.setBlock(var38, var41, var44, minableBlockId, 14, 2);
}
}
}
}
}
}
}
return true;
}
}

View file

@ -0,0 +1,80 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
public class WorldGenBadlands2 extends WorldGenerator
{
/** The block ID of the ore to be placed using this generator. */
private int minableBlockId;
/** The number of blocks to generate. */
private int numberOfBlocks;
public WorldGenBadlands2(int par1, int par2)
{
minableBlockId = par1;
numberOfBlocks = par2;
}
@Override
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float)Math.PI;
double var7 = par3 + 8 + MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var9 = par3 + 8 - MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var11 = par5 + 8 + MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var13 = par5 + 8 - MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var15 = par4 + par2Random.nextInt(3) - 2;
double var17 = par4 + par2Random.nextInt(3) - 2;
for (int var19 = 0; var19 <= numberOfBlocks; ++var19)
{
double var20 = var7 + (var9 - var7) * var19 / numberOfBlocks;
double var22 = var15 + (var17 - var15) * var19 / numberOfBlocks;
double var24 = var11 + (var13 - var11) * var19 / numberOfBlocks;
double var26 = par2Random.nextDouble() * numberOfBlocks / 16.0D;
double var28 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
double var30 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
for (int var38 = var32; var38 <= var35; ++var38)
{
double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
if (var39 * var39 < 1.0D)
{
for (int var41 = var33; var41 <= var36; ++var41)
{
double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
if (var39 * var39 + var42 * var42 < 1.0D)
{
for (int var44 = var34; var44 <= var37; ++var44)
{
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Block.field_111032_cD.blockID || par1World.getBlockId(var38, var41, var44) == Blocks.holyGrass.get().blockID)
{
par1World.setBlock(var38, var41, var44, minableBlockId, 1, 2);
}
}
}
}
}
}
}
return true;
}
}

View file

@ -0,0 +1,80 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
public class WorldGenBadlands3 extends WorldGenerator
{
/** The block ID of the ore to be placed using this generator. */
private int minableBlockId;
/** The number of blocks to generate. */
private int numberOfBlocks;
public WorldGenBadlands3(int par1, int par2)
{
minableBlockId = par1;
numberOfBlocks = par2;
}
@Override
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float)Math.PI;
double var7 = par3 + 8 + MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var9 = par3 + 8 - MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var11 = par5 + 8 + MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var13 = par5 + 8 - MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var15 = par4 + par2Random.nextInt(3) - 2;
double var17 = par4 + par2Random.nextInt(3) - 2;
for (int var19 = 0; var19 <= numberOfBlocks; ++var19)
{
double var20 = var7 + (var9 - var7) * var19 / numberOfBlocks;
double var22 = var15 + (var17 - var15) * var19 / numberOfBlocks;
double var24 = var11 + (var13 - var11) * var19 / numberOfBlocks;
double var26 = par2Random.nextDouble() * numberOfBlocks / 16.0D;
double var28 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
double var30 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
for (int var38 = var32; var38 <= var35; ++var38)
{
double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
if (var39 * var39 < 1.0D)
{
for (int var41 = var33; var41 <= var36; ++var41)
{
double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
if (var39 * var39 + var42 * var42 < 1.0D)
{
for (int var44 = var34; var44 <= var37; ++var44)
{
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Block.field_111032_cD.blockID || par1World.getBlockId(var38, var41, var44) == Blocks.holyGrass.get().blockID)
{
par1World.setBlock(var38, var41, var44, minableBlockId, 4, 2);
}
}
}
}
}
}
}
return true;
}
}

View file

@ -0,0 +1,80 @@
package biomesoplenty.worldgen;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import biomesoplenty.api.Blocks;
public class WorldGenBadlands4 extends WorldGenerator
{
/** The block ID of the ore to be placed using this generator. */
private int minableBlockId;
/** The number of blocks to generate. */
private int numberOfBlocks;
public WorldGenBadlands4(int par1, int par2)
{
minableBlockId = par1;
numberOfBlocks = par2;
}
@Override
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
{
float var6 = par2Random.nextFloat() * (float)Math.PI;
double var7 = par3 + 8 + MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var9 = par3 + 8 - MathHelper.sin(var6) * numberOfBlocks / 8.0F;
double var11 = par5 + 8 + MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var13 = par5 + 8 - MathHelper.cos(var6) * numberOfBlocks / 8.0F;
double var15 = par4 + par2Random.nextInt(3) - 2;
double var17 = par4 + par2Random.nextInt(3) - 2;
for (int var19 = 0; var19 <= numberOfBlocks; ++var19)
{
double var20 = var7 + (var9 - var7) * var19 / numberOfBlocks;
double var22 = var15 + (var17 - var15) * var19 / numberOfBlocks;
double var24 = var11 + (var13 - var11) * var19 / numberOfBlocks;
double var26 = par2Random.nextDouble() * numberOfBlocks / 16.0D;
double var28 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
double var30 = (MathHelper.sin(var19 * (float)Math.PI / numberOfBlocks) + 1.0F) * var26 + 1.0D;
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
for (int var38 = var32; var38 <= var35; ++var38)
{
double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
if (var39 * var39 < 1.0D)
{
for (int var41 = var33; var41 <= var36; ++var41)
{
double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
if (var39 * var39 + var42 * var42 < 1.0D)
{
for (int var44 = var34; var44 <= var37; ++var44)
{
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Block.field_111032_cD.blockID || par1World.getBlockId(var38, var41, var44) == Blocks.holyGrass.get().blockID)
{
par1World.setBlock(var38, var41, var44, minableBlockId, 0, 2);
}
}
}
}
}
}
}
return true;
}
}