Merge pull request 'Fix AutoChecker only counts filled Dispenser' (#453) from SchematicSystem/AutoPrüfer into main

Reviewed-on: SteamWar/SteamWar#453
Reviewed-by: YoyoNow <4+yoyonow@noreply.localhost>
This commit is contained in:
2026-07-17 14:27:01 +02:00
@@ -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);
}
}
}