diff --git a/src/de/craftinc/gates/util/FloodUtil.java b/src/de/craftinc/gates/util/FloodUtil.java index e515d76..555b567 100644 --- a/src/de/craftinc/gates/util/FloodUtil.java +++ b/src/de/craftinc/gates/util/FloodUtil.java @@ -13,7 +13,7 @@ import de.craftinc.gates.Plugin; public class FloodUtil { - private final static int frameBlockSearchLimit = 20; + private final static int frameBlockSearchLimit = 40; private static final Set exp1 = new HashSet(); private static final Set exp2 = new HashSet(); @@ -38,19 +38,23 @@ public class FloodUtil Set blocks1 = getAirFloodBlocks(block, new HashSet(), exp1, frameBlockSearchLimit); Set blocks2 = getAirFloodBlocks(block, new HashSet(), exp2, frameBlockSearchLimit); - if (blocks1 == null && blocks2 == null) { + if (blocks1 == null && blocks2 == null) + { return null; } - if (blocks1 == null) { + if (blocks1 == null) + { return blocks2; } - if (blocks2 == null) { + if (blocks2 == null) + { return blocks1; } - if (blocks1.size() > blocks2.size()) { + if (blocks1.size() > blocks2.size()) + { return blocks2; } @@ -58,10 +62,12 @@ public class FloodUtil } - public static Set getAirFloodBlocks(Block startBlock, Set foundBlocks, Set expandFaces, int limit) + private static Set getAirFloodBlocks(Block startBlock, Set foundBlocks, Set expandFaces, int limit) { if (foundBlocks == null) + { return null; + } if (foundBlocks.size() > limit) {