private static void loadChunkData(CompoundTag levelTag, short[][] sectionBlockIds, byte[][] sectionBlockData, boolean[] sectionsUsed, byte[] biomeIds) {
        for (int i = 0; i < MAX_CHUNK_SECTIONS; i++) {
            sectionsUsed[i] = false;
        }
        Tag biomesTag = levelTag.getValue().get("Biomes");
        if (biomesTag != null) {
            System.arraycopy(((ByteArrayTag) biomesTag).getValue(), 0, biomeIds, 0, 16 * 16);
        } else {
            for (int i = 0; i < 16 * 16; i++) {
                biomeIds[i] = -1;
            }
        }

        for (Tag t : ((ListTag) levelTag.getValue().get("Sections")).getValue()) {
            CompoundTag sectionInfo = (CompoundTag) t;
            int sectionIndex = ((ByteTag) sectionInfo.getValue().get("Y")).getValue().intValue();
            byte[] blockIdsLow = ((ByteArrayTag) sectionInfo.getValue().get("Blocks")).getValue();
            byte[] blockData = ((ByteArrayTag) sectionInfo.getValue().get("Data")).getValue();
            Tag addTag = sectionInfo.getValue().get("Add");
            byte[] blockAdd = null;
            if (addTag != null) {
                blockAdd = ((ByteArrayTag) addTag).getValue();
            }
            @SuppressWarnings("MismatchedReadAndWriteOfArray")
            short[] destSectionBlockIds = sectionBlockIds[sectionIndex];
            @SuppressWarnings("MismatchedReadAndWriteOfArray")
            byte[] destSectionData = sectionBlockData[sectionIndex];
            sectionsUsed[sectionIndex] = true;
            for (int y = 0; y < 16; ++y) {
                for (int z = 0; z < 16; ++z) {
                    for (int x = 0; x < 16; ++x) {
                        int index = y * 256 + z * 16 + x;
                        short blockType = (short) (blockIdsLow[index] & 0xFF);
                        if (blockAdd != null) {
                            blockType |= getBlockFromNybbleArray(blockAdd, index) << 8;
                        }
                        destSectionBlockIds[index] = blockType;
                        destSectionData[index] = getBlockFromNybbleArray(blockData, index);
                    }
                }
            }
        }
    }