public int[][][] getMapData() {
        ensureCapacity();
        if (mapData != null) {
            return mapData;
        }
        FileInputStream dataStream = null;
        try {
            dataStream = new FileInputStream(DATA);
            mapData = new int[4][64][64];
            if (regionData != null) {
                dataStream.skip(regionData.getIndex());
                byte[] data = new byte[regionData.getSize()];
                dataStream.read(data);
                ByteBuffer buffer = ByteBuffer.wrap(data);
                for (int plane = 0; plane < 4; plane++) {
                    for (int tx = 0; tx < 64; tx++) {
                        for (int ty = 0; ty < 64; ty++) {
                            mapData[plane][tx][ty] = buffer.getInt();
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (dataStream != null) {
                try {
                    dataStream.close();
                } catch (IOException e) {
                }
            }
        }
        return mapData;
    }