From 5c5dcda22e49eece85fe7a2a3b0ab298eff2aaaa Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sat, 21 Sep 2013 19:25:33 -0400 Subject: [PATCH] Changed how marshes generate --- .../biomes/BiomeGenGrassland.java | 2 -- .../biomesoplenty/biomes/BiomeGenMarsh.java | 15 +++++--------- .../configuration/BOPBiomes.java | 2 +- .../worldgen/WorldGenOutback.java | 20 ++++++++++++++++++- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/common/biomesoplenty/biomes/BiomeGenGrassland.java b/common/biomesoplenty/biomes/BiomeGenGrassland.java index d7e50c926..bd549cc47 100644 --- a/common/biomesoplenty/biomes/BiomeGenGrassland.java +++ b/common/biomesoplenty/biomes/BiomeGenGrassland.java @@ -31,8 +31,6 @@ public class BiomeGenGrassland extends BiomeGenBase customBiomeDecorator.wheatGrassPerChunk = 1; customBiomeDecorator.reedsPerChunk = 35; customBiomeDecorator.mushroomsPerChunk = 20; - customBiomeDecorator.sandPerChunk = -999; - customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.waterLakesPerChunk = 15; customBiomeDecorator.portobellosPerChunk = 3; customBiomeDecorator.reedsBOPPerChunk = 5; diff --git a/common/biomesoplenty/biomes/BiomeGenMarsh.java b/common/biomesoplenty/biomes/BiomeGenMarsh.java index b3ba03d8f..a78a7a985 100644 --- a/common/biomesoplenty/biomes/BiomeGenMarsh.java +++ b/common/biomesoplenty/biomes/BiomeGenMarsh.java @@ -25,8 +25,12 @@ public class BiomeGenMarsh extends BiomeGenBase customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; customBiomeDecorator.treesPerChunk = -999; customBiomeDecorator.flowersPerChunk = -999; - customBiomeDecorator.grassPerChunk = 65; + customBiomeDecorator.grassPerChunk = 50; + customBiomeDecorator.wheatGrassPerChunk = 50; customBiomeDecorator.highGrassPerChunk = 25; + customBiomeDecorator.waterLakesPerChunk = 75; + customBiomeDecorator.sandPerChunk = -999; + customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.generatePumpkins = false; spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3)); } @@ -35,7 +39,6 @@ public class BiomeGenMarsh extends BiomeGenBase public void decorate(World par1World, Random par2Random, int par3, int par4) { super.decorate(par1World, par2Random, par3, par4); - WorldGenMarsh var5 = new WorldGenMarsh(); int var55 = 12 + par2Random.nextInt(6); @@ -51,14 +54,6 @@ public class BiomeGenMarsh extends BiomeGenBase par1World.setBlock(var77, var88, var99, Blocks.amethystOre.get().blockID, 12, 2); } } - - for (int var6 = 0; var6 < 25; ++var6) - { - int var7 = par3 + par2Random.nextInt(16) + 8; - byte var8 = 62; - int var9 = par4 + par2Random.nextInt(16) + 8; - var5.generate(par1World, par2Random, var7, var8, var9); - } } /** diff --git a/common/biomesoplenty/configuration/BOPBiomes.java b/common/biomesoplenty/configuration/BOPBiomes.java index 7fceb3409..15fda3e1d 100644 --- a/common/biomesoplenty/configuration/BOPBiomes.java +++ b/common/biomesoplenty/configuration/BOPBiomes.java @@ -226,7 +226,7 @@ public class BOPBiomes { Biomes.lushSwamp = Optional.of((new BiomeGenLushSwamp(BOPConfigurationIDs.lushSwampID)).setColor(522674).setBiomeName("Lush Swamp").func_76733_a(9154376).setMinMaxHeight(0.2F, 0.3F).setTemperatureRainfall(0.7F, 1.0F)); Biomes.mangrove = Optional.of((new BiomeGenMangrove(BOPConfigurationIDs.mangroveID)).setColor(16440917).setBiomeName("Mangrove").setMinMaxHeight(0.1F, 0.3F).setTemperatureRainfall(0.8F, 0.9F)); Biomes.mapleWoods = Optional.of((new BiomeGenMapleWoods(BOPConfigurationIDs.mapleWoodsID)).setColor(747097).setBiomeName("Maple Woods").func_76733_a(5159473).setTemperatureRainfall(0.2F, 0.8F).setMinMaxHeight(0.3F, 0.6F)); - Biomes.marsh = Optional.of((new BiomeGenMarsh(BOPConfigurationIDs.marshID)).setColor(10486015).setBiomeName("Marsh").setMinMaxHeight(-0.5F, 0.05F).setTemperatureRainfall(0.5F, 0.9F)); + Biomes.marsh = Optional.of((new BiomeGenMarsh(BOPConfigurationIDs.marshID)).setColor(10486015).setBiomeName("Marsh").setMinMaxHeight(0.3F, 0.3F).setTemperatureRainfall(0.5F, 0.9F)); Biomes.meadow = Optional.of((new BiomeGenMeadow(BOPConfigurationIDs.meadowID)).setColor(9286496).setBiomeName("Meadow").setTemperatureRainfall(0.7F, 0.7F)); Biomes.meadowForest = Optional.of((new BiomeGenMeadowForest(BOPConfigurationIDs.meadowForestID)).setColor(9286496).setBiomeName("Meadow Forest").setTemperatureRainfall(0.7F, 0.7F)); Biomes.mesa = Optional.of((new BiomeGenMesa(BOPConfigurationIDs.mesaID)).setColor(16421912).setBiomeName("Mesa").setDisableRain().setTemperatureRainfall(2.0F, 0.05F).setMinMaxHeight(0.4F, 2.0F)); diff --git a/common/biomesoplenty/worldgen/WorldGenOutback.java b/common/biomesoplenty/worldgen/WorldGenOutback.java index d0720dd89..f912a630a 100644 --- a/common/biomesoplenty/worldgen/WorldGenOutback.java +++ b/common/biomesoplenty/worldgen/WorldGenOutback.java @@ -34,11 +34,29 @@ public class WorldGenOutback extends WorldGenerator int var8 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); int var9 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); int var10 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); + + int var999 = par2Random.nextInt(5); if (par1World.isAirBlock(var8, var9, var10) && (par1World.getBlockId(var8, var9 - 1, var10) == Blocks.hardSand.get().blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.sand.blockID || par1World.getBlockId(var8, var9 - 1, var10) == Block.stone.blockID)) { par1World.setBlock(var8, var9 - 1, var10, Block.grass.blockID, 0, 2); - par1World.setBlock(var8, var9, var10, tallGrassID, tallGrassMetadata, 2); + + if (var999 == 0) + { + par1World.setBlock(var8, var9, var10, tallGrassID, tallGrassMetadata, 2); + } + else if (var999 == 1) + { + par1World.setBlock(var8, var9, var10, Blocks.foliage.get().blockID, 10, 2); + } + else if (var999 == 2) + { + par1World.setBlock(var8, var9, var10, Blocks.foliage.get().blockID, 11, 2); + } + else + { + par1World.setBlock(var8, var9, var10, tallGrassID, tallGrassMetadata, 2); + } } }