fix infinite loop in BushTreeFeature (#1589)

This commit is contained in:
LoganDark 2020-04-21 04:23:31 -07:00 committed by GitHub
parent 3d69190338
commit 21ae14f67b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public class BushTreeFeature extends TreeFeatureBase
protected boolean place(Set<BlockPos> changedLogs, Set<BlockPos> 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))
{