From ed600efd33a840337e236c90e56cf3a7b82c48aa Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Mon, 30 Sep 2013 05:16:08 -0400 Subject: [PATCH] Fixed palm trees not generating in spaces with foliage/flowers. Made sunflowers not generate unless both spaces are empty. --- common/biomesoplenty/worldgen/WorldGenSunflower.java | 2 +- common/biomesoplenty/worldgen/tree/WorldGenPalmTree1.java | 2 +- common/biomesoplenty/worldgen/tree/WorldGenPalmTree3.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/biomesoplenty/worldgen/WorldGenSunflower.java b/common/biomesoplenty/worldgen/WorldGenSunflower.java index edc1aafbf..9741efc9e 100644 --- a/common/biomesoplenty/worldgen/WorldGenSunflower.java +++ b/common/biomesoplenty/worldgen/WorldGenSunflower.java @@ -29,7 +29,7 @@ public class WorldGenSunflower extends WorldGenerator int j1 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); int k1 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); - if (par1World.isAirBlock(i1, j1, k1) && (!par1World.provider.hasNoSky || j1 < 127) && (par1World.getFullBlockLightValue(i1, j1, k1) >= 8 || par1World.canBlockSeeTheSky(i1, j1, k1)) + if (par1World.isAirBlock(i1, j1, k1) && par1World.isAirBlock(i1, j1 + 1, k1) && (!par1World.provider.hasNoSky || j1 < 127) && (par1World.getFullBlockLightValue(i1, j1, k1) >= 8 || par1World.canBlockSeeTheSky(i1, j1, k1)) && Block.blocksList[plantBlockId].canPlaceBlockOnSide(par1World, i1, j1, k1, 1, new ItemStack(plantBlockId, 1, plantBlockMeta))) { par1World.setBlock(i1, j1, k1, Blocks.flowers.get().blockID, 13, 2); diff --git a/common/biomesoplenty/worldgen/tree/WorldGenPalmTree1.java b/common/biomesoplenty/worldgen/tree/WorldGenPalmTree1.java index e7740fed8..298d2b9d6 100644 --- a/common/biomesoplenty/worldgen/tree/WorldGenPalmTree1.java +++ b/common/biomesoplenty/worldgen/tree/WorldGenPalmTree1.java @@ -101,7 +101,7 @@ public class WorldGenPalmTree1 extends WorldGenerator public void buildBlock(World world, int x, int y, int z, int id, int meta) { Material m = world.getBlockMaterial(x, y, z); - if(m == Material.air || m == Material.leaves) + if(m == Material.air || m == Material.leaves || m == Material.vine || m == Material.plants) { world.setBlock(x, y, z, id, meta, 2); } diff --git a/common/biomesoplenty/worldgen/tree/WorldGenPalmTree3.java b/common/biomesoplenty/worldgen/tree/WorldGenPalmTree3.java index 38b0475f0..4977ab4e8 100644 --- a/common/biomesoplenty/worldgen/tree/WorldGenPalmTree3.java +++ b/common/biomesoplenty/worldgen/tree/WorldGenPalmTree3.java @@ -101,7 +101,7 @@ public class WorldGenPalmTree3 extends WorldGenerator public void buildBlock(World world, int x, int y, int z, int id, int meta) { Material m = world.getBlockMaterial(x, y, z); - if(m == Material.air || m == Material.leaves) + if(m == Material.air || m == Material.leaves || m == Material.vine || m == Material.plants) { world.setBlock(x, y, z, id, meta, 2); }