public Schematic(String resourceName) {
        Scanner sc = new Scanner(getClass().getResourceAsStream(resourceName));
        Vector<String> lines = new Vector<>();
        while (sc.hasNextLine()) lines.add(sc.nextLine());
        this.height = lines.size();
        int h = 0, w, d;
        for (String line : lines) {
            String[] rows = line.split(",");
            w = 0;
            for (String row : rows) {
                if (width == 0) {
                    width = row.length();
                    blockMap = new Material[height * width * depth];
                }
                if (row.length() != width) throw new IllegalArgumentException("Wrong width in resourse " + resourceName);
                String[] blocks = row.split(":");
                if (depth == 0) depth = blocks.length;
                if (blocks.length != depth) throw new IllegalArgumentException("Wrong depth in resourse " + resourceName);
                d = 0;
                for (String block : blocks) {
                    Material m = Material.AIR;
                    try {
                        m = Material.getMaterial(Integer.parseInt(block));
                        setMaterial(h, w, d, m);
                        d++;
                    }
                    catch (NumberFormatException e) {
                        Logger.getLogger(Schematic.class.getSimpleName()).log(
                                Level.INFO, "Wrong block in resourse " + resourceName
                        );
                    }
                    finally {
                        setMaterial(h, w, d, m);
                    }
                }
                w++;
            }
            h++;
        }
    }