From 21ae14f67b5a1344f9d61c34c3d04cb8147e2e8f Mon Sep 17 00:00:00 2001 From: LoganDark Date: Tue, 21 Apr 2020 04:23:31 -0700 Subject: [PATCH] fix infinite loop in BushTreeFeature (#1589) --- .../common/world/gen/feature/tree/BushTreeFeature.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/biomesoplenty/common/world/gen/feature/tree/BushTreeFeature.java b/src/main/java/biomesoplenty/common/world/gen/feature/tree/BushTreeFeature.java index 981027432..43fbd52ee 100644 --- a/src/main/java/biomesoplenty/common/world/gen/feature/tree/BushTreeFeature.java +++ b/src/main/java/biomesoplenty/common/world/gen/feature/tree/BushTreeFeature.java @@ -52,7 +52,7 @@ public class BushTreeFeature extends TreeFeatureBase protected boolean place(Set changedLogs, Set changedLeaves, IWorld world, Random random, BlockPos startPos, MutableBoundingBox boundingBox) { // Move down until we reach the ground - while (startPos.getY() > 1 && world.isEmptyBlock(startPos) || world.getBlockState(startPos).getMaterial() == Material.AIR) {startPos = startPos.below();} + while (startPos.getY() > 1 && (world.isEmptyBlock(startPos) || world.getBlockState(startPos).getMaterial() == Material.AIR)) {startPos = startPos.below();} if (!this.placeOn.matches(world, startPos)) {