Difference between revisions of "User:Chibill/Map Format"
Line 394: | Line 394: | ||
****** NBTByteArray(BlockLight) | ****** NBTByteArray(BlockLight) | ||
****** NBTLongArray(BlockStates) | ****** NBTLongArray(BlockStates) | ||
− | ****** NBTList(Palette): Holds the palette for the blocks stored in the NBTLongArray. They are stored much in the same way as in the Chunk Data Packet. See [ | + | ****** NBTList(Palette): Holds the palette for the blocks stored in the NBTLongArray. They are stored much in the same way as in the Chunk Data Packet. See [[Chunk_Format#Chunk_Section_structure]] |
******* NBTCompound() | ******* NBTCompound() | ||
******** NBTString(Name) | ******** NBTString(Name) |
Latest revision as of 07:03, 18 December 2017
Rewrite in progress
|
This page covers the world information as of 17w47a to the present. See Alpha Map Format for Alpha information. See [[..]] for Information before the "Flattening". Though some information is also valid for before 17w47a.
Contents
General Information
Worlds are represented as a series of regions, within which are a number of columns, and chunks. Each region is 32x1x32 columns, each column is 1x16x1 chunks, and each chunk is 16x16x16 blocks. The overall block height of a column is 256. Each chunk stores four (or five) things - block state array (Long Array), block light (4-bit),palette, and sky light (4-bit).Block light is light cast by things like torches and glowstone, and is calculated with a 3D Flood Fill algorithm. Sky light is the light cast by the sky, and is calculated by starting at the top and working your way down. As you pass through semi-transparent blocks, you decrease the lighting value until you hit an opaque block. The opaque block is the last block whose skylight has a nonzero value. Lighting starts at 0xF (brightest) and works down to 0x0 (dimmest). Columns store biome information. Each 1x256x1 cuboid of blocks has the same biome value, for a total of 256 possible biome values per chunk (16x16). Biome values are stored as bytes.
Biome Values
Name | Value |
---|---|
Ocean | 0 |
Plains | 1 |
Desert | 2 |
Extreme Hills | 3 |
Forest | 4 |
Taiga | 5 |
Swampland | 6 |
River | 7 |
Hell | 8 |
Sky | 9 |
Frozen Ocean | 10 |
Frozen River | 11 |
Ice Plains | 12 |
Ice Mountains | 13 |
Mushroom Island | 14 |
Mushroom Island Shore | 15 |
Beaches | 16 |
Desert Hills | 17 |
Forest Hills | 18 |
Taiga Hills | 19 |
Extreme Hills Edge | 20 |
Jungle | 21 |
Jungle Hills | 22 |
Jungle Edge | 23 |
Deep Ocean | 24 |
Stone Beach | 25 |
Cold Beach | 26 |
Birch Forest | 27 |
Birch Forest Hills | 28 |
Roofed Forest | 29 |
Cold Taiga | 30 |
Cold Taiga Hills | 31 |
Mega Taiga | 32 |
Mega Taiga Hills | 33 |
Extreme Hills+ | 34 |
Savanna | 35 |
Savanna Plateau | 36 |
Mesa | 37 |
Mesa Plateau F | 38 |
Mesa Plateau | 39 |
The Void | 127 |
Sunflower Plains | 129 |
Desert M | 130 |
Extreme Hills M | 131 |
Flower Forest | 132 |
Taiga M | 133 |
Swampland M | 134 |
Ice Plains Spikes | 140 |
Jungle M | 149 |
JungleEdge M | 151 |
Birch Forest M | 155 |
Birch Forest Hills M | 156 |
Roofed Forest M | 157 |
Cold Taiga M | 158 |
Mega Spruce Tagia | 160 |
Redwood Taiga Hills M | 161 |
Extreme Hills+ M | 162 |
Savanna M | 163 |
Savanna Plateau M | 164 |
Mesa (Bryce) | 165 |
Mese Plateau F M | 166 |
Mesa Plateau M | 167 |
Storage
This section documents the Anvil format for servers.
Maps are stored as a specific directory structure with several NBT files within. For the sake of examples, the world we'll be working with is stored in a folder called "/world".
Directory Structure
- /world/data: Stores extra world data (Villages,Mineshafts,Temples)
- /world/DIM-1: Nether world
- /world/DIM-1/region: Nether world regions
- /world/DIM1: End world
- /world/DIM1/region: End world regions
- /world/players: Player data
- /world/region: Overworld regions
level.dat
In the root directory is a level.dat file. The structure of that file is this:
- NBTCompound(Data)
- NBTCompound(DataPacks)
- NBTList(Disabled)
- NBTList(Enabled): Generally contains the string "vanilla"
- NBTCompound(DimensionData)
- NBTCompound(1)
- NBTCompound(DragonFight)
- NBTList(Gateways)
- NBTByte(DragonKilled)
- NBTByte(PreviouslyKilled)
- NBTCompound(DragonFight)
- NBTCompound(1)
- NBTCompound(GameRules)
- NBTString(announceAdvancemtns): One for each game rule with the value being the game rules value.
- NBTCompound(Version)
- NBTInt(Id): 1451 for 17w47a
- NBTString(Name): Name of the version
- NBTByte(Snapshot): If the version is a snapshot
- NBTDouble(BoarderCenterX)
- NBTDouble(BoarderCenterZ)
- NBTDouble(BoarderDamagerPerBlock)
- NBTDouble(BorderSafeZone)
- NBTDouble(BoarderSize)
- NBTDouble(BorderSizeLerpTarget)
- NBTLong(BorderSizeLerpTime)
- NBTDouble(BoarderWarningBlocks)
- NBTDouble(BoarderWarningTime)
- NBTInt(clearWeatherTime)
- NBTInt(DataVersion)
- NBTLong(DayTime)
- NBTByte(Difficulty)
- NBTByte(DifficultyLocked)
- NBTInt(GameType)
- NBTString(generatorName)
- NBTString(generatorOptions)
- NBTInt(generatorVersion)
- NBTByte(hardcore)
- NBTByte(initialized)
- NBTLong(LastPlayed)
- NBTString(LevelName)
- NBTByte(MapFeatures): Set to 1 if structures are generated, such as villages
- NBTByte(raining): Set to 1 if currently raining
- NBTInt(rainTime): The ticks remaining until rain stops?
- NBTLong(RandomSeed)
- NBTLong(SizeOnDisk): Has been 0 since 1.2.5 (Weird? Whats the point of this?)
- NBTInt(SpawnX)
- NBTInt(SpawnY)
- NBTInt(SpawnZ)
- NBTByte(thundering): Set to 1 if currently thundering (only if there is potential for thunder, not if a thunderbolt is currently in progress)
- NBTInt(thunderTime)
- NBTInt(version)
- NBTCompound(DataPacks)
[playeruuid].dat
Each player that has ever connected is given a [playeruuid].dat file.
- NBTCompound
- NBTCompound(abilities)
- NBTByte(flying): 1 if flying
- NBTFloat(flySpeed): Generally 0.05
- NBTByte(instaBuild)
- NBTByte(invulnerable)
- NBTByte(mayBuild)
- NBTByte(mayFly)
- NBTFloat(walkSpeed): Generally 0.1
- NBTCompound(recipeBook)
- NBTList(recipes)
- NBTList(toBeDisplayed)
- NBTByte(isFilteringCraftable)
- NBTByte(isGuiOpen)
- NBTCompound(Attributes)
- NBTCompound(): One entry for each Attribute the player has.
- NBTDouble(Base)
- NBTString(Name)
- NBTCompound(): One entry for each Attribute the player has.
- NBTList(EnderItems)
- NBTCompound(Inventory)
- NBTCompound
- NBTCompound(tag)
- NBTInt(Damage)
- NBTByte(Count)
- NBTByte(Slot)
- NBTString(id)
- NBTCompound(tag)
- NBTCompound
- NBTList(Motion)
- NBTDouble
- NBTDouble
- NBTDouble
- NBTList(Pos)
- NBTDouble
- NBTDouble
- NBTDouble
- NBTList(Rotation)
- NBTFloat
- NBTFloat
- NBTFloat(AbsorptionAmount)
- NBTShort(Air)
- NBTInt(DataVersion)
- NBTShort(DeathTime)
- NBTInt(Dimension)
- NBTFloat(FallDistance)
- NBTByte(FallFlying)
- NBTShort(Fire): Ticks until the player is no longer on fire, or zero
- NBTFloat(foodExhaustionLevel)
- NBTInt(foodLevel)
- NBTFloat(foodSaturationLevel)
- NBTInt(foodTickTimer)
- NBTShort(Health)
- NBTInt(HurtByTimestamp)
- NBTShort(HurtTime)
- NBTByte(Invnerable)
- NBTByte(OnGround)
- NBTInt(playerGameType)
- NBTInt(PortalCooldown)
- NBTInt(Score)
- NBTByte(seenCredits)
- NBTInt(SelectedItemSlot)
- NBTByte(Sleeping)
- NBTShort(SleepTimer)
- NBTLong(UUIDLeast)
- NBTLong(UUIDMost)
- NBTInt(XpLevel)
- NBTFloat(XpP)
- NBTFloat(XpSeed)
- NBTInt(XpTotal)
- NBTCompound(abilities)
[region].mca
Each region file is named "r.x.z.mca", where x and z are the coordinates. These coordinates are relative to each region. Given column coordinates, divide them by 32 to get the region coordinates.
- NBTCompound
- NBTCompound(Chunk [x,z]): x and z are region column coordinates, not relative to the overall world. The compound name is a misnomer, it actually represents column.
- NBTCompound(Level)
- NBTByte(TerrainPopulated): 1 if this column has been generated
- NBTInt(xPos): In global, world-relative chunk coordinates
- NBTInt(zPos): In global, world-relative chunk coordinates
- NBTLong(LastUpdate): The last time a block changed in this column
- NBTByte(LightPopulated)
- NBTByte(TerrainPopulated)
- NBTLong(InhabitedTime)
- NBTByteArray(Biomes): Always 256 Entries
- NBTList(Entities)
- NBTCompound
- NBTByte(OnGround)
- NBTShort(Air)
- NBTShort(AttackTime)
- NBTShort(DeathTime)
- NBTShort(Fire)
- NBTShort(Health)
- NBTShort(HurtTime)
- NBTFloat(FallDistance)
- NBTString(id): Example: "Skeleton"
- NBTList(Motion)
- NBTDouble
- NBTDouble
- NBTDouble
- NBTList(Pos)
- NBTDouble
- NBTDouble
- NBTDouble
- NBTList(Rotation)
- NBTFloat
- NBTFloat
- NBTCompound
- NBTList(Sections): Chunks
- NBTCompound
- NBTByte(Y): 0-16
- NBTByteArray(BlockLight)
- NBTLongArray(BlockStates)
- NBTList(Palette): Holds the palette for the blocks stored in the NBTLongArray. They are stored much in the same way as in the Chunk Data Packet. See Chunk_Format#Chunk_Section_structure
- NBTCompound()
- NBTString(Name)
- NBTCompound()
- NBTString(Name)
- NBTCompound(Properties)
- NBTString(<name>) : Key is the name of the property being saved
- NBTCompound()
- NBTByteArray(SkyLight)
- NBTCompound
- NBTList(TileEntities)
- NBTIntArray(HeightMap): 256 entries
- NBTCompound(Level)
- NBTCompound(Chunk [x,z]): x and z are region column coordinates, not relative to the overall world. The compound name is a misnomer, it actually represents column.