From db44da4c7ab8f0c007160847aea120c7df81dc1a Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Fri, 5 Jul 2013 01:21:10 -0400 Subject: [PATCH] Tweaked the Badlands and Mystic Grove --- .../biomesoplenty/textures/blocks/algae.png | Bin 310 -> 311 bytes .../biomes/BiomeDecoratorBOP.java | 35 +++++++- .../biomes/BiomeGenBadlands.java | 6 +- .../biomes/BiomeGenMysticGrove.java | 8 +- .../worldgen/WorldGenBadlands.java | 80 ++++++++++++++++++ .../worldgen/WorldGenBadlands2.java | 80 ++++++++++++++++++ .../worldgen/WorldGenBadlands3.java | 80 ++++++++++++++++++ .../worldgen/WorldGenBadlands4.java | 80 ++++++++++++++++++ 8 files changed, 362 insertions(+), 7 deletions(-) create mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenBadlands.java create mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenBadlands2.java create mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenBadlands3.java create mode 100644 src/minecraft/biomesoplenty/worldgen/WorldGenBadlands4.java diff --git a/src/minecraft/assets/biomesoplenty/textures/blocks/algae.png b/src/minecraft/assets/biomesoplenty/textures/blocks/algae.png index c876831aa0d5c7eeed875d8507c603565fe601a7..84d1590f0d847bdf137922d1f9acb243c8dc7f88 100644 GIT binary patch delta 222 zcmV<403rXj0=EK?JPN@801m+cxRGn^kwz(hvq?ljR5(wSkV^^zK@dX+`fMIS&_n3L zO9*bfhC7d_WF*b2^z?v>P*tfU{aIRTf8lsOd^k@RnhkQV_q}kN3(p1(?1kQ>`SHB2 zxZF-9AW;ShWf1nv`Go%Me zsL7MuZ$UeLa3@{$PJfX31o>g%H!_GCYE=utUlw>(2C4V15DA(&n^P?}NOJPN`901mS?tipg)PS413IHX#NNbEQv*Z#$0y6rv9Z~--=Q^76UJ8=OQSTod6%!Hfg^%?Q{ z-0Q{>&O+i9vZapDipvgEr#Jw$pp^$!Gw$RAr6$3M4}mx8pe`pA9)!L!LVr~a$kQ1lJk+c;pm_jPuhi diff --git a/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java b/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java index 1f21bc216..1440724a5 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java @@ -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; @@ -695,10 +711,25 @@ 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) diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenBadlands.java b/src/minecraft/biomesoplenty/biomes/BiomeGenBadlands.java index 29525b3c7..e30f6761c 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenBadlands.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenBadlands.java @@ -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 diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenMysticGrove.java b/src/minecraft/biomesoplenty/biomes/BiomeGenMysticGrove.java index 2ed814bf0..5b7743ec6 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenMysticGrove.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenMysticGrove.java @@ -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; } /** diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands.java b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands.java new file mode 100644 index 000000000..2ca099576 --- /dev/null +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands.java @@ -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; + } +} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands2.java b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands2.java new file mode 100644 index 000000000..7564c5517 --- /dev/null +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands2.java @@ -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; + } +} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands3.java b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands3.java new file mode 100644 index 000000000..8d411e576 --- /dev/null +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands3.java @@ -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; + } +} diff --git a/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands4.java b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands4.java new file mode 100644 index 000000000..053c7be4e --- /dev/null +++ b/src/minecraft/biomesoplenty/worldgen/WorldGenBadlands4.java @@ -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; + } +}