@SuppressWarnings("unchecked")
    public BlockMap(int x, int y, int z) {
        width = x / 16;
        depth = y / 16;
        height = z / 16;
        if (width == 0) {
            width = 1;
        }

        if (depth == 0) {
            depth = 1;
        }

        if (height == 0) {
            height = 1;
        }

        entityGrid = new ArrayList[width * depth * height];

        for (x = 0; x < width; ++x) {
            for (y = 0; y < depth; ++y) {
                for (z = 0; z < height; ++z) {
                    entityGrid[(z * depth + y) * width + x] = new ArrayList<>();
                }
            }
        }

    }