
World file format explained · Java · Advanced
Inside a Modern Minecraft Chunk: Sections, Block Palettes, and Bit-Packed States
Modern Minecraft Java Edition worlds store terrain using a highly optimized system of 16x16x16 sub-chunks, dynamic block palettes, and bit-packed integer arrays. Understanding this structure allows you to manually inspect, debug, and surgical-edit chunk data at the lowest possible level. This guide explores the anatomy of post-1.18 chunk sections using our browser-based NBT Editor, where all your files are processed locally and never uploaded.
What you need
- A Minecraft Java Edition world folder or .zip archive (version 1.18 or newer recommended)
- A full backup of your world folder before inspecting or altering any region files
- Access to the NBT Editor on world.9minecraft.net
Step by step
1Back Up Your World and Load a Region File
Before inspecting or modifying raw chunk data, create a complete copy of your world folder and store it safely, as manual bit-level edits can easily corrupt a region file. Launch the NBT Editor on our site and click Open world folder or .zip to load your save directly into your browser memory. Navigate to the region folder (or DIM-1/region for the Nether, DIM1/region for the End) and select an .mca file, such as r.0.0.mca, to expand its list of contained chunks.
Tip: If you are looking for a specific coordinate, divide your block X and Z coordinates by 16 (rounding down) to find the chunk coordinates, or by 512 to find the region file numbers.
2Locate the Chunk Sections List
Click on any populated chunk inside the region file to view its root NBT compound tag. In modern Java Edition worlds (DataVersion 2844 and above, corresponding to 1.18+), the old Level wrapper tag is gone, and you will see a tag list named sections directly at the root. Expand the sections list to reveal multiple compound tags, each representing a 16x16x16 vertical sub-chunk stacked from the bottom of the world to the top.
Tip: Check the DataVersion integer tag at the root of the chunk if the structure looks unfamiliar; older versions store sections inside a Level compound with uppercase tag names.
3Identify Your Target Sub-Chunk via the Y Tag
Open one of the compound tags inside the sections list and look at the Byte tag named Y. This value represents the vertical index of the 16x16x16 section, not the raw block coordinate; multiply Y by 16 to get the lowest block Y-level in that section. For example, in a standard Overworld starting at Y=-64, the bottom-most terrain section has a Y tag of -4, while sea level (around block Y=63) resides inside section Y=3.
Tip: You may see a section at the very bottom (such as Y=-5) that contains no block_states tag at all; Minecraft creates this dummy section solely to store downward skylight propagation.
4Inspect the Local Block Palette
Inside a populated section compound, locate and expand the block_states compound tag, then expand the palette list within it. Instead of assigning every block in the game a permanent global ID number, Minecraft builds this local list containing only the unique block states actually present within this specific 16x16x16 cube. Each entry in the palette is a compound containing a Name string (like minecraft:stone or minecraft:oak_stairs) and an optional Properties compound defining state variables like facing, waterlogged, or half.
Tip: If an entire 16x16x16 section consists of a single block type—such as solid minecraft:air high in the sky—the palette will have only one entry, and the data array tag will be completely absent to save space.
5Examine the Bit-Packed Data Array
Directly below the palette inside block_states, look for a Long Array tag named data. This array encodes the 4,096 blocks (16x16x16) of the section by storing their index position from the palette list, packed tightly into 64-bit integers. The number of bits used per block equals the base-2 logarithm of the palette size (rounded up), with a strict minimum of 4 bits per block. Because a 4-bit index means 16 blocks fit into a single 64-bit long, a section with up to 16 unique block types will always have a data array containing exactly 256 longs (4,096 divided by 16).
6Explore the 4x4x4 Biome Palette and Data
Collapse block_states and expand the sibling compound tag named biomes within the same section. Biomes use the exact same palette and bit-packed data architecture as blocks, but at a lower spatial resolution: each entry represents a 4x4x4 volume of blocks rather than a 1x1x1 block. Consequently, a 16x16x16 section contains only 64 biome cells (4x4x4), and its bit-packed data array enforces a minimum of 1 bit per entry rather than 4. If the entire section shares a single biome, you will only see a one-item palette list and no data array.
Tip: You can safely swap a block type or biome across an entire 16x16x16 section in the NBT Editor just by changing the Name string inside its palette entry and saving the file, completely avoiding the need to recalculate the bit-packed data array.
How it works
Prior to Minecraft 1.13 (The Flattening), chunks stored blocks using fixed numerical IDs and 4-bit metadata values, which severely limited the total number of blocks the game could support. Modern chunks solve this through local palettization: a 16x16x16 section only needs enough binary bits per block to count the unique block states currently inside that specific cube. If a section contains 12 different types of blocks, the palette has 12 entries (indexed 0 through 11). To store indices up to 11 in binary, the game uses the minimum allocation of 4 bits per block (which can represent indices 0 to 15). If a player places a 17th unique block type into that section, 4 bits are no longer enough, and the game dynamically rebuilds the data array using 5 bits per block.
The 4,096 block indices inside the data Long Array are ordered by iterating across X first, then Z, and finally Y—meaning the array index for any local coordinate (0 to 15) is calculated as (Y * 256) + (Z * 16) + X. In Minecraft versions 1.13 through 1.15, individual block indices could be split across the boundary of two consecutive 64-bit longs. Starting in Minecraft 1.16 (DataVersion 2529), Mojang changed the packing logic so indices never span across two longs; instead, if a 64-bit long does not have enough remaining bits at the end to fit the next block index (for example, packing 5-bit indices leaves 4 unused padding bits after storing 12 blocks in a 64-bit integer), those leftover bits are padded with zeros and the next block starts fresh at the beginning of the next long.
Because the bit-packing math is entirely dependent on the exact length of the palette list, the palette and the data array are tightly coupled. When you use our NBT Editor to modify an existing palette entry in place—such as renaming minecraft:cobblestone to minecraft:diamond_block—the palette length and array indices remain completely valid, replacing every instance of that block in the 16x16x16 section instantly. However, adding or deleting entries from the palette changes the required bit-width or shifts the index numbers, which scrambles the entire section unless the 64-bit long array is mathematically unpacked and repacked.
Common mistakes
- Deleting an entry from the palette list without repacking the data array, which shifts all subsequent palette indices down by one and turns the wrong blocks into different materials or corrupts the chunk.
- Adding a 17th unique block to a 16-entry palette without resizing the data array from 4-bit packing (256 longs) to 5-bit packing (342 longs), causing the game to reject the section and regenerate the chunk from scratch.
- Forgetting to add the required Properties compound when manually editing a palette entry to a stateful block (like changing minecraft:stone to minecraft:furnace without specifying its facing and lit states).
- Assuming bit-packed indices span across 64-bit integer boundaries in modern worlds; post-1.16 chunks always pad the unused upper bits of a long with zeros when a block index cannot fit completely.
FAQ
Why is the data Long Array completely missing from some of my chunk sections?
When every single block in a 16x16x16 section is identical (most commonly 4,096 blocks of minecraft:air, minecraft:cave_air, or deep underground minecraft:deepslate), the palette contains only one entry (index 0). Minecraft omits the data array entirely in this case because 4,096 zeros do not need to be stored explicitly.
How do I calculate the exact length of the data Long Array for a given palette size?
First, find the bits-per-block: take the ceiling of log2(palette_size), but if the result is less than 4, use 4 (for biomes, the minimum is 1). Next, divide 64 by that bit size and round down (integer division) to find how many blocks fit into a single 64-bit long. Finally, divide 4,096 by the blocks-per-long and round up to get the exact number of longs in the data array.
What happens if two entries in the same section palette have the exact same block Name and Properties?
Normally Minecraft merges duplicate states automatically in memory, but if you create duplicate palette entries in the NBT Editor, both indices remain valid and will render the same block in-game until the chunk is modified and re-saved by the game engine.
Modern Minecraft Java Edition chunks divide terrain into 16x16x16 sections that compress 4,096 blocks and 64 biome cells into local palettes and bit-packed 64-bit long arrays, which you can safely inspect and edit in place using our browser-based NBT Editor.