diff --git a/SchematicSystem/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java b/SchematicSystem/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java index 1d7c0d68..6fa2be03 100644 --- a/SchematicSystem/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java +++ b/SchematicSystem/src/de/steamwar/schematicsystem/autocheck/AutoChecker.java @@ -73,14 +73,19 @@ public class AutoChecker { continue; } - result.getBlockCounts().merge(material, 1, Integer::sum); + BlockPos pos = new BlockPos(x, y, z); if (AutoCheckerItems.impl.getInventoryMaterials().contains(material)) { - checkInventory(result, block, material, new BlockPos(x, y, z), type); + checkInventory(result, block, material, pos, type); + if (result.getDispenserItems().getOrDefault(pos, 0) > 0) { + result.getBlockCounts().merge(material, 1, Integer::sum); + } + } else { + result.getBlockCounts().merge(material, 1, Integer::sum); } if (x == min.x() || x == max.x() || y == max.y() || z == min.z() || z == max.z()) { - result.getDesignBlocks().computeIfAbsent(material, m -> new ArrayList<>()).add(new BlockPos(x, y, z)); + result.getDesignBlocks().computeIfAbsent(material, m -> new ArrayList<>()).add(pos); } } }