![]() |
VOOZH | about |
Chunks store the terrain and entities within a 16×384×16 area in the Overworld, and 16×256×16 in the Nether and the End by default. They also store precomputed lighting, heightmap data for Minecraft's performance, and other meta information.
Chunks are stored as tags in regional Minecraft Anvil files, which are named in the form r.x.z.mca. They are stored in NBT format, with the following structure (updated for 1.18):
x, z origin, not relative to the region).x, z origin, not relative to the region).-4 in 1.18).minecraft:empty, minecraft:structure_starts, minecraft:structure_references, minecraft:biomes, minecraft:noise, minecraft:surface, minecraft:carvers/minecraft:liquid_carvers, minecraft:features, minecraft:light/minecraft:initialize_light, minecraft:spawn, or minecraft:full. All status except minecraft:full are used for chunks called proto-chunks, in other words, for chunks with incomplete generation.name being the name of the block state property
0xF for each block). The format of how these levels is stored is the same as for BlockLight.INVALID" and removing all other tags.
INVALID.
true/false) - (Fortress "NeSCLT" and "NeSCRT") Whether this fortress piece should contain a chest but hasn't had one generated yet. (Stronghold "SHCC") Whether this chest in this stronghold piece was placed. (Village "ViS") Whether the blacksmith chest has been generated.true/false) - (Desert temple) Whether 1st chest was placed.true/false) - (Desert temple) Whether 2nd chest was placed.true/false) - (Desert temple) Whether 3rd chest was placed.true/false) - (Desert temple) Whether 4th chest was placed.true/false) - (Mineshaft "MSCorridor") Whether the corridor has a cave spider monster spawner.true/false) - (Mineshaft "MSCorridor") Whether the corridor has rails.true/false) - If this ocean ruin is big.terrain_matching, or rigid.true/false) - (Stronghold "SHS") Whether the corridor has an opening on the left.true/false) - (Stronghold "SH5C") Whether the 5-way crossing has an exit on the upper level on the side with the upward staircase.true/false) - (Stronghold "SH5C") Whether the 5-way crossing has an exit on the lower level on the side with the upward staircase.true/false) - (Fortress "NeMT") Whether this fortress piece should contain a blaze monster spawner but hasn't had one generated yet. (Stronghold "SHPR") Whether the silverfish monster spawner has been placed in this piece.true/false) - (Jungle temple) Whether the hidden chest was placed.true/false) - (Jungle temple) Whether the main chest was placed.true/false) - (Jungle temple) Whether the hallway arrow trap dispenser was placed.true/false) - (Jungle temple) Whether the chest arrow trap dispenser was placed.true/false) - (Stronghold "SHS") Whether the corridor has an opening on the right.true/false) - (Stronghold "SH5C") Whether the 5-way crossing has an exit on the upper level on the side with the downward staircase.true/false) - (Stronghold "SH5C") Whether the 5-way crossing has an exit on the lower level on the side with the downward staircase.true/false) - (Mineshaft "MSCorridor") Whether the corridor has cobwebs.true/false) - (Stronghold "SHSD") Whether the spiral staircase is the source of the Stronghold or was randomly generated.true/false) - (Stronghold "SHLi") Whether the library has an upper level.true/false) - (Village "ViSH") Whether the house has a ladder to the roof and fencing.[verify]true/false) - (Mineshaft "MSCrossing") Whether the crossing is two floors tall.true/false) - (Witch hut) Whether the initial witch has been spawned for the hut.true/false) - (Village) Whether this village generated as a zombie village.[verify]INVALID.INVALID.INVALID", else it's the structure name.INVALID.
In the Anvil format, block positions are ordered YZX for compression purposes.
The coordinate system is as follows:
This means indices are ordered like in a book, with its top to the North, read from beneath and with words written backward: each letter is a different X-index, each line a Z-index, and each page a Y-index. In case of a flat 2D array, the Y-index is omitted, and the array reads like a single page.
Each section is a 16×16×16-block area, with up to 16 sections in a chunk : from 0 at the bottom, to 15 on top. Empty sections are not saved. Each section has a "Y" byte for its Y-index (0 to 15), a "Palette" list linking IDs to block states, and a "BlockStates" long array storing the IDs per block location, compressed by fitting multiple IDs inside each entry (see NBT_structure above for details on the compression). There might be an additional section at the top and or bottom of the world used to store light, so that light travels properly over and under the world limits.
The pseudo-code below shows how to access individual block information from a single section.
byte Nibble4(byte[] arr, int index){
return index%2 == 0 ? arr[index/2]&0x0F : (arr[index/2]>>4)&0x0F;
}
int BlockPos = y*16*16 + z*16 + x;
compound Block = Palette[change_array_element_size(BlockStates,Log2(length(Palette)))[BlockPos]];
string BlockName = Block.Name;
compound BlockState = Block.Properties;
byte Blocklight = Nibble4(BlockLight, BlockPos);
byte Skylight = Nibble4(SkyLight, BlockPos);
Tile Ticks represent block updates that need to happen because they could not happen before the chunk was saved. Examples reasons for tile ticks include redstone circuits needing to continue updating, water and lava that should continue flowing, recently placed sand or gravel that should fall, etc. Tile ticks are not used for purposes such as leaf decay, where the decay information is stored in the leaf block data values and handled by Minecraft when the chunk loads. For map makers, tile ticks can be used to update blocks after a period of time has passed with the chunk loaded into memory.
This [NBT List / JSON Array] List is always present, and contains 16 [NBT List / JSON Array] Sublists, each representing one of the "sections" of the chunk. Those inside lists may contain [Short] Shorts, each representing a packed coordinate relative to the section : The 4 most significant bits are always 0, then each group of 4 bits (or nibble) represents a section-relative coordinate, from 0 to 15. The order of sections in the list appear to be ordered from bottom to top, and the packing order of the coordinates is 0ZYX, where 0 refers to the chunk section. When converting proto-chunks to full chunks, only coordinates that are stored in PostProcessing appear to receive a tick update, tick updates stored in block_ticks, and fluid_ticks are ignored. [verify]
| Java Edition Beta | |||||||
|---|---|---|---|---|---|---|---|
| 1.2 | Originally, chunks were stored as individual chunk files ".dat" where the file names contained the chunk's position encoded in Base36. | ||||||
| The format used was Java Edition Alpha level format. | |||||||
| 1.3 | The Region format is introduced. | ||||||
| Chunks are now stored in groups of 32×32 chunks in individual ".mcr" files with the coordinates in decimal. | |||||||
| The goal was to reduce disk usage by cutting down on the number of file handles Minecraft had open at once.. | |||||||
| Java Edition | |||||||
| 1.2.1 | 12w07a | The Anvil file format is introduced. | |||||
| Chunks are now divided into 16 individual 16×16×16 block sections. | |||||||
| Blocks, Data, BlockLight, and SkyLight arrays are now housed in individual chunk Sections. | |||||||
| The NBT Format now includes an integer array tag similar to the existing byte array tag. | |||||||
| 1.3.1 | 12w21a | MaxExperience, RemainingExperience, ExperienceRegenTick, ExperienceRegenRate and ExperienceRegenAmount from MobSpawner have been removed. | |||||
| 1.4.2 | 12w34a | Added entity WitherBoss. | |||||
| 1.5 | 13w02a | Added entity MinecartTNT.
| |||||
Minecart is now deprecated. | |||||||
| 13w03a | Added entity MinecartHopper. | ||||||
| 13w06a | Added entity MinecartSpawner. | ||||||
| 1.6.1 | 13w16a | Added entity EntityHorse. | |||||
| 13w21a | ArmorType has been removed from EntityHorse.
| ||||||
Saddle has been removed from EntityHorse. | |||||||
| release | Saddle to EntityHorse has been re-added. | ||||||
| 1.7.2 | 13w39a | Added entity MinecartCommandBlock. | |||||
| 13w42a | Added CanBreakDoors to Zombie. | ||||||
| 1.8 | 14w02a | Added Lock to containers.
| |||||
| Item IDs are no longer used when specifying NBT data. | |||||||
Added Block to FallingSand, using the alphabetical ID format. | |||||||
| 14w06a | Added ShowParticles to all mobs.
| ||||||
Added PickupDelay to item entities.
| |||||||
Setting Age to -32768 makes items, which never expire.
| |||||||
AttackTime has been removed from mobs. | |||||||
| 14w10a | Added rewardExp to Villager.
| ||||||
Added OwnerUUID for mobs that can breed.
| |||||||
Added Owner to Skull.
| |||||||
Changes to item frames and paintings: added Facing, TileX, TileY and TileZ now represent the co-ordinates of the block the item is in rather than what it is placed on. Direction and Dir are now deprecated. | |||||||
| 14w11a | Added entity Endermite.
| ||||||
Added EndermiteCount to Enderman. | |||||||
| 14w21a | CustomName and CustomNameVisible now work for all entities. | ||||||
| 14w25a | Added entity Guardian.
| ||||||
Added Text1, Text2, Text3 and Text4 to signs. The limit no longer depends on the amount of characters (16), it now depends on the width of the characters. | |||||||
| 14w27a | Added entity Rabbit.
Added CommandStats to command blocks and signs. | ||||||
| 14w28a | EndermiteCount has been removed from Enderman. | ||||||
| 14w30a | Added Silent for all entities. | ||||||
| 14w32a | Added NoAI for all mobs.
| ||||||
Added entity ArmorStand. | |||||||
| 14w32c | Added NoBasePlate to ArmorStand. | ||||||
| 1.9 | 15w31a | Added tags HandItems, ArmorItems, HandDropChances, and ArmorDropChances to Living, which now replace the DropChances and Equipment tags.
| |||||
Added HandItems and ArmorItems to ArmorStand.
| |||||||
Added Glowing to Entity.
| |||||||
Added Team to LivingBase.
| |||||||
Added DragonPhase to EnderDragon
| |||||||
Added entity Shulker, child of Entity.
| |||||||
Added entity ShulkerBullet, child of Entity.
| |||||||
Added entity DragonFireball, which extends FireballBase and has no unique tags.
| |||||||
Added entities TippedArrow and SpectralArrow, children of Arrow.
| |||||||
Added block EndGateway, child of TileEntity.
| |||||||
Added block Structure, child of TileEntity.
| |||||||
Added item tag Potion, child of tag. | |||||||
| 15w32a | Tags and DataVersion tag can now be applied on entities.
| ||||||
Changed the Fuse tag's type for the PrimedTnt entity from "Byte" to "Short". | |||||||
| 15w32c | Introduced a limit on the amount of tags an entity can now have (1024 tags). When surpassed it displays an error saying: "Cannot add more than 1024 tags to an entity." | ||||||
| 15w33a | Added entity AreaEffectCloud, child of Entity.
| ||||||
Added ExactTeleport and renamed Life to Age for EndGateway.
| |||||||
Added Linger to ThrownPotion.
| |||||||
DataVersion from Entity has been removed. It is now applied to Player only, child of LivingBase.
| |||||||
UUID from Entity has been removed.
| |||||||
HealF under LivingBase has now become deprecated.
| |||||||
Health under LivingBase has now changed from type "Short" to "Float".
| |||||||
Equipment has been removed from ArmorStand and Living entity, its usage is now replaced by HandItems and ArmorItems, which were added earlier. | |||||||
| 15w33c | Added BeamTarget to EnderCrystal. | ||||||
| 15w34a | Added powered and conditional byte tags to Control tile entity for command blocks.
| ||||||
Added life and power to FireballBase.
| |||||||
Added id inside SpawnData to MobSpawner.
| |||||||
Added powered to the Music tile entity for note blocks. | |||||||
| 15w35a | Added VillagerProfession to Zombie. | ||||||
| 15w37a | Added Enabled to MinecartHopper. | ||||||
| 15w38a | Added SkeletonTrap and SkeletonTrapTime to EntityHorse. | ||||||
| 15w41a | Riding has been replaced with Passengers for all entities.
| ||||||
Added RootVehicle for all passengers.
| |||||||
Added Type to Boat. | |||||||
| 15w42a | Added Fuel to Cauldron (brewing stands). | ||||||
| 15w43a | Added LootTable and LootTableSeed to Chest, Minecart and MinecartHopper.
| ||||||
Added DeathLootTable and DeathLootTableSeed to all mobs.
| |||||||
Added life and power to all fireballs (FireballBase). | |||||||
| 15w44a | Added ShowBottom to EnderCrystal. | ||||||
| 15w44b | Added Potion and CustomPotionEffects to Arrow.
| ||||||
Added Potion to AreaEffectCloud. | |||||||
| 15w45a | Linger has been removed from ThrownPotion. Instead, the potion lingers if the stored item has an ID of minecraft:lingering_potion.
| ||||||
ThrownPotion now renders as its stored item, even if the item is not a potion. | |||||||
| 15w46a | MoreCarrotTicks from Rabbit is now set to 40 when rabbits eat a carrot crop, but is not used anyway. | ||||||
| 15w47a | Added PaymentItem to Beacon. | ||||||
| 15w49a | PaymentItem has been removed from Beacon.
| ||||||
| In order for a sign to accept text, all 4 tags ("Text1", "Text2", "Text3", and "Text4") must exist. | |||||||
| 15w51b | The original values of DisabledSlots in ArmorStand have been changed in nature. | ||||||
| 1.10 | 16w20a | Added entity PolarBear.
| |||||
Added ZombieType to Zombie, replacing VillagerProfession and IsVillager. Value of 6 indicates the "husk" zombie.
| |||||||
A value of 2 on SkeletonType indicates the "stray" skeleton.
| |||||||
NoGravity extended to all entities.
| |||||||
Added powered, showboundingbox and showair to Structure. | |||||||
| 16w21a | Added FallFlying to mobs and armor stands.
| ||||||
Added integrity and seed to Structure. | |||||||
| pre1 | Added ParticleParam1 and ParticleParam2 to AreaEffectCloud. | ||||||
| 1.11 | 16w32a | Horses have been split into entity IDs horse, donkey, mule, skeleton_horse and zombie_horse for their respective types. Type and HasReproduced removed from horse, ChestedHorse and Items tags now apply only to mule and donkey, and SkeletonTrap and SkeletonTrapTime tags now apply only to skeleton_horse.
| |||||
Skeletons have been split into entity IDs skeleton, stray and wither_skeleton. SkeletonType tag is removed from all skeleton types.
| |||||||
Zombies have been split into entity IDs zombie, zombie_villager and husk. ZombieType tag is removed from all zombie types, ConversionTime and Profession tags now apply only to zombie_villager.
| |||||||
Guardians have been split into entity IDs guardian and elder_guardian. Elder tag has been removed from guardian.
| |||||||
Unused savegame IDs Mob and Monster have been removed.
| |||||||
Pumpkin byte tag has been added to snowman. | |||||||
| 16w35a | Added CustomName to banner. | ||||||
| 16w39a | Added llama, llama_spit, vindication_illager, vex, evocation_fangs and evocation_illager.
| ||||||
Added Color to shulker.
| |||||||
Added LocName, CustomPotionColor and ColorMap to items. | |||||||
| 16w40a | Added Johnny to vindication_illager.
| ||||||
Removed xTile, yTile, zTile, inTile, inGround from the FireballBase class (in large fireballs, small fireballs, dragon fireballs, and wither skulls). | |||||||
| 16w41a | llama_spit is now available as a save game entity. | ||||||
| 16w42a | Added crit to arrow. | ||||||
| 16w43a | Added OwnerUUIDLeast and OwnerUUIDMost to evocation_fangs. | ||||||
| 16w44a | xTile, yTile, zTile, inTile, inGround have been removed from the fishing bobber entity. | ||||||
| pre1 | ench has been changed to require at least one compound. | ||||||
| 1.12 | 17w13a | Added entity Parrot, ShoulderEntityLeft/ShoulderEntityRight, seenCredits, recipeBook and Recipes. | |||||
| 17w14a | Added isFilteringCraftable, isGuiOpen and recipes to recipeBook, which is now a compound tag.
| ||||||
Added ConversionPlayerLeast and ConversionPlayerMost to entity Zombie. | |||||||
| 17w16a | NBT parsing in commands has been improved. | ||||||
| 17w17a | Added toBeDisplayed to recipeBook, UpdateLastExecution and LastExecution. | ||||||
| 17w17b | Added LoveCauseLeast and LoveCauseMost to breedable entities. | ||||||
| 1.13 | 17w47a | The damage tag from items removed, tools and armor now use Damage and maps use map, both in tag.
| |||||
Endermen's carried and carriedData merged into carriedBlockState.
| |||||||
Arrows' inTile and inData merged into inBlockState.
| |||||||
Minecarts' DisplayTile and DisplayData merged into DisplayState.
| |||||||
Falling blocks' Block and Data merged into BlockState.
| |||||||
Moving pistons' BlockId and BlockData merged into blockState.
| |||||||
| Removed note block and flower pot block entities. | |||||||
Trapped chests now have their own block entity trapped_chest.
| |||||||
Removed Base from banners.
| |||||||
Removed Rot from heads. | |||||||
| 17w47a | Removed Record from jukeboxes. | ||||||
| 17w47b | Trapped chests no longer have their own block entity, and again use chest. | ||||||
| 18w01a | Thrower and Owner has been changed from strings to compounds with two longs named L and M. | ||||||
| 18w02a | Bobbers created by fishing rods now have the entity ID fishing_bobber.
| ||||||
| Painting motives are now lowercased and namespaced. | |||||||
| 18w07a | Added turtle, trident, and phantom entities.
| ||||||
Added HomePosX, HomePosY, HomePosZ, TravelPosX, TravelPosY, TravelPosZ, and HasEgg to turtle.
| |||||||
Added AX, AY, AZ, and Size to phantom. | |||||||
| 18w15a | Added dolphin entity. | ||||||
| 18w19a | Renamed puffer_fish to pufferfish. | ||||||
| 18w20a | Renamed cod_mob to cod.
| ||||||
Renamed salmon_mob to salmon. | |||||||
| 18w21a | Added TreasurePosX, TreasurePosY, TreasurePosZ, GotFish, and CanFindTreasure to dolphin.
| ||||||
ench has been renamed to Enchantments.
| |||||||
Enchantments no longer accepts numeric IDs, and instead requires name IDs. | |||||||
| pre5 | Renamed xp_orb to experience_orb.
| ||||||
Renamed xp_bottle to experience_bottle.
| |||||||
Renamed eye_of_ender_signal to eye_of_ender.
| |||||||
Renamed ender_crystal to end_crystal.
| |||||||
Renamed fireworks_rocket to firework_rocket.
| |||||||
Renamed commandblock_minecart to command_block_minecart.
| |||||||
Renamed villager_golem to iron_golem.
| |||||||
Renamed evocation_fangs to evoker_fangs.
| |||||||
Renamed evocation_illager to evoker.
| |||||||
Renamed vindication_illager to vindicator.
| |||||||
Renamed illusion_illager to illusioner. | |||||||
| 1.14 | 18w43a | Added illager_beast, panda, and pillager entities. | |||||
| 18w45a | The LIGHT_BLOCKING heightmap has been removed. | ||||||
| 1.15 | 19w36a | The [Int Array] Biomes array in the [NBT Compound / JSON Object] Level tag for each chunk now contains 1024 integers instead of 256, allowing biomes to differ based on altitude. | |||||
| 1.16 | 20w12a | UUIDs went from [Long] UUIDLeast/[Long] UUIDMost to [Int Array] UUID. | |||||
| 1.17 | 20w45a | Entities have been extracted from main (terrain) once they become full chunks, and are now stored in separate entities directory (similar to POI storage). Those new files are still region files with NBT. See Java Edition level format. | |||||
| 20w51a | Added axolotl. | ||||||
| 21w03a | Added glow_squid. | ||||||
| 21w13a | Added goat. | ||||||
| 1.18 | 21w39a | Paths for the block and biome data have changed:
| |||||
Chunk’s Level.CarvingMasks[] is now long[] instead of byte[]. | |||||||
| 21w43a | Removed chunk’s Level and moved everything it contained up.
| ||||||
Added yPos the minimum section y position in the chunk.
| |||||||
Added below_zero_retrogen containing data to support below zero generation.
| |||||||
Added blending_data containing data to support blending new world generation with existing chunks. | |||||||
| 1.20.2 | 23w32a | Game no longer uses numeric values when storing mob effects to world. For example, 4 becomes minecraft:mining_fatigue. | |||||
Changed following fields in mob effect instances:
| |||||||
In NBT format for block entity type beacon:
| |||||||
| 1.21 | 24w21a | Renamed Attributes field in mob data to attributes
| |||||
Changed following fields in mob attributes:
| |||||||
Changed following fields in mob attribute modifiers:
| |||||||
| 1.21.2 | 24w39a | Renamed Lock field in containers to lock and now it has become a compound that represents an item predicate. | |||||
| 1.21.5 | 25w07a | The CustomName field will no longer be preserved when removed. | |||||
The LootTable field will no longer be preserved when removed. | |||||||
end_gateway: The exit_portal field will no longer be preserved when removed. | |||||||
furnace, smoker, blast_furnace: The RecipesUsed field will no longer be preserved when removed. | |||||||
skull: The note_block_sound field will no longer be preserved when removed. | |||||||
| 25w09a | campfire: The CookingTimes and CookingTotalTimes fields will no longer be preserved when removed. | ||||||
chiseled_bookshelf: The last_interacted_slot field now defaults to -1 if not specified. | |||||||
hopper: The TransferCooldown field now default to -1 if not specified. | |||||||
jigsaw: The name, target, and pool fields now default to minecraft:empty if not specified, the final_state field now defaults to minecraft:air if not specified. | |||||||
sculk_shrieker: The warning_level field now defaults to 0 if not specified. | |||||||
structure_block: The ignoreEntities and showboundingbox fields now default to true if not specified, the posY field now defaults to 1 if not specified. | |||||||