From 88ffcac32f95c0fc3931430ffbc2ae86de092193 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 4 Mar 2023 16:38:57 +0100 Subject: [PATCH] Fix AirShip AIR count Signed-off-by: Lixfel --- .../steamwar/schematicsystem/autocheck/AutoCheckerResult.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java index 72054e1..989fd97 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/autocheck/AutoCheckerResult.java @@ -89,7 +89,7 @@ public class AutoCheckerResult { } public boolean isBlockCountOk() { - return type.getMaxBlocks() == 0 || blockCounts.values().stream().reduce(Integer::sum).map(i -> i <= type.getMaxBlocks()).orElse(false); + return type.getMaxBlocks() == 0 || blockCounts.entrySet().stream().filter(entry -> entry.getKey() != Material.AIR).map(Map.Entry::getValue).reduce(Integer::sum).map(i -> i <= type.getMaxBlocks()).orElse(false); } public boolean isLimitedBlocksOK() {