From 56e4a7deca9a66a98e478db53b4bb01babd56233 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Fri, 27 Sep 2013 21:42:34 -0400 Subject: [PATCH] Made reeds generate based on the distance to land rather than the depth of the water --- .../worldgen/WorldGenWaterReeds.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/common/biomesoplenty/worldgen/WorldGenWaterReeds.java b/common/biomesoplenty/worldgen/WorldGenWaterReeds.java index bfafb71f0..01bcf6087 100644 --- a/common/biomesoplenty/worldgen/WorldGenWaterReeds.java +++ b/common/biomesoplenty/worldgen/WorldGenWaterReeds.java @@ -17,27 +17,14 @@ public class WorldGenWaterReeds extends WorldGenerator int var7 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); int var8 = par4 + par2Random.nextInt(2) - par2Random.nextInt(2); int var9 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); - - int var999 = par2Random.nextInt(64); if (par1World.isAirBlock(var7, var8, var9) && par1World.getBlockId(var7, var8 - 1, var9) == Block.waterStill.blockID) { - if (par1World.getBlockId(var7, var8 - 2, var9) != Block.waterStill.blockID) + for (int var900 = 5; var900 > -5; --var900) { - par1World.setBlock(var7, var8, var9, Blocks.plants.get().blockID, 14, 2); - } - else - { - if (par1World.getBlockId(var7, var8 - 3, var9) != Block.waterStill.blockID) + if (par1World.getBlockId(var7 - var900, var8 - 1, var9 - var900) != Block.waterStill.blockID && par1World.getBlockId(var7 - var900, var8 - 1, var9 - var900) != Block.waterMoving.blockID) { - if (var999 == 0) - { - par1World.setBlock(var7, var8, var9, Blocks.plants.get().blockID, 14, 2); - } - } - else - { - return false; + par1World.setBlock(var7, var8, var9, Blocks.plants.get().blockID, 14, 2); } } }