From 7819a042dd9ab34b29916871dd926ae23c95a85e Mon Sep 17 00:00:00 2001 From: Cheeserolls Date: Mon, 1 Jun 2015 18:04:03 +0100 Subject: [PATCH] Stop GeneratorLogs replacing non-air blocks --- .../biomesoplenty/common/world/feature/GeneratorLogs.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java b/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java index 67bb2d15d..143b5bf75 100644 --- a/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java +++ b/src/main/java/biomesoplenty/common/world/feature/GeneratorLogs.java @@ -117,8 +117,8 @@ public class GeneratorLogs extends BOPGeneratorBase BlockLog.EnumAxis direction = (random.nextInt(2) == 0) ? BlockLog.EnumAxis.X : BlockLog.EnumAxis.Z; int length = this.minLength + random.nextInt(this.maxLength - this.minLength); - // keep placing logs along the chosen direction (as long as the block beaneath is suitable) - while(length > 0 && this.placeOn.matches(world.getBlockState(pos.down()))) + // keep placing logs along the chosen direction (as long as the block beneath is suitable) + while(length > 0 && world.isAirBlock(pos) && this.placeOn.matches(world.getBlockState(pos.down()))) { world.setBlockState(pos, this.log.withProperty(this.axisProperty, direction)); pos = (direction == BlockLog.EnumAxis.X) ? pos.east() : pos.north();