private void verifyBounds(int x, int y, int z) {
        if (x < 0 || x > maxSize || y < 0 || y > maxSize || z < 0 || z > maxSize) {
            throw new IllegalArgumentException("An index is out of bounds! (" + x + ", " + y + ", " + z + ")!");
        }
    }