Difference between revisions of "Zh:Map Format"
(Created page with "本页面包含了自1.2.5至今的世界信息。有关Alpha信息,另见Alpha地图格式。 == 一般信息 == 世界以一连串区域表示,...") |
(→生物群系值) |
||
Line 8: | Line 8: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! | + | ! 名称 |
− | ! | + | ! 值 |
|- | |- | ||
− | | | + | | 海洋 |
| 0 | | 0 | ||
|- | |- | ||
− | | | + | | 平原 |
| 1 | | 1 | ||
|- | |- | ||
− | | | + | | 沙漠 |
| 2 | | 2 | ||
|- | |- | ||
− | | | + | | 峭壁 |
| 3 | | 3 | ||
|- | |- | ||
− | | | + | | 森林 |
| 4 | | 4 | ||
|- | |- | ||
− | | | + | | 针叶林 |
| 5 | | 5 | ||
|- | |- | ||
− | | | + | | 沼泽 |
| 6 | | 6 | ||
|- | |- | ||
− | | | + | | 河流 |
| 7 | | 7 | ||
|- | |- | ||
− | | | + | | 下界 |
| 8 | | 8 | ||
|- | |- | ||
− | | | + | | 末地 |
| 9 | | 9 | ||
|- | |- | ||
− | | | + | | 冻洋 |
| 10 | | 10 | ||
|- | |- | ||
− | | | + | | 冻河 |
| 11 | | 11 | ||
|- | |- | ||
− | | | + | | 积雪的冻原 |
| 12 | | 12 | ||
|- | |- | ||
− | | | + | | 积雪的山地 |
| 13 | | 13 | ||
|- | |- | ||
− | | | + | | 蘑菇岛 |
| 14 | | 14 | ||
|- | |- | ||
− | | | + | | 蘑菇岛岸 |
| 15 | | 15 | ||
|- | |- | ||
− | | | + | | 沙滩 |
| 16 | | 16 | ||
|- | |- | ||
− | | | + | | 沙漠丘陵 |
| 17 | | 17 | ||
|- | |- | ||
− | | | + | | 森林丘陵 |
| 18 | | 18 | ||
|- | |- | ||
− | | | + | | 针叶林丘陵 |
| 19 | | 19 | ||
|- | |- | ||
− | | | + | | 峭壁边缘 |
| 20 | | 20 | ||
|- | |- | ||
− | | | + | | 丛林 |
| 21 | | 21 | ||
|- | |- | ||
− | | | + | | 丛林丘陵 |
| 22 | | 22 | ||
|} | |} |
Revision as of 01:15, 16 November 2019
本页面包含了自1.2.5至今的世界信息。有关Alpha信息,另见Alpha地图格式。
Contents
一般信息
世界以一连串区域表示,其中包含了许多纵列和区块。每个区域是32x1x32的纵列,每个纵列是1x16x1的区块,而每个区块是16x16x16的方块。一个纵列的总高度是256。每个区块存储4(或5)个东西——方块ID(8位)、方块元信息(4位)、方块光照(4位)和天空光照(4位)。可选的第五个值为“add”数据,它是要加到方块ID的四位来支持额外的方块ID(不用于原版Minecraft)。方块光照是由如火把和萤石投射的光照,并使用3DFlood Fill算法计算。天空光照是由天空投射的光照,并使用从上而下计算。当透过半透明方块时会降低亮度值直至遇上不透明方块。不透明方块是天空光照拥有非零值的最后一个方块。亮度从0xF(最亮)开始,一直到0x0(最暗)。纵列存储生物群系信息。每1x256x1长方体的方块拥有相同的生物群系值,每个区块(16x16)拥有共256种可能的生物群系值。生物群系以字节存储。
生物群系值
名称 | 值 |
---|---|
海洋 | 0 |
平原 | 1 |
沙漠 | 2 |
峭壁 | 3 |
森林 | 4 |
针叶林 | 5 |
沼泽 | 6 |
河流 | 7 |
下界 | 8 |
末地 | 9 |
冻洋 | 10 |
冻河 | 11 |
积雪的冻原 | 12 |
积雪的山地 | 13 |
蘑菇岛 | 14 |
蘑菇岛岸 | 15 |
沙滩 | 16 |
沙漠丘陵 | 17 |
森林丘陵 | 18 |
针叶林丘陵 | 19 |
峭壁边缘 | 20 |
丛林 | 21 |
丛林丘陵 | 22 |
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: Unused
- /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)
- NBTByte(hardcore)
- NBTByte(MapFeatures): Set to 1 if structures are generated, such as villages
- NBTByte(raining): Set to 1 if currently raining
- NBTByte(thundering): Set to 1 if currently thundering (only if there is potential for thunder, not if a thunderbolt is currently in progress)
- NBTInt(GameType)
- NBTInt(generatorVersion): 0 for 1.2.5
- NBTInt(rainTime): The ticks remaining until rain stops?
- NBTInt(SpawnX)
- NBTInt(SpawnY)
- NBTInt(SpawnZ)
- NBTInt(thunderTime)
- NBTInt(version): 19133 for 1.2.5
- NBTLong(LastPlayed)
- NBTLong(RandomSeed)
- NBTLong(SizeOnDisk): Always 0 for 1.2.5
- NBTLong(Time)
- NBTString(generatorName)
- NBTString(LevelName)
[playeruuid].dat
Each player that has ever connected is given a [playeruuid].dat file.
- NBTCompound
- NBTByte(OnGround)
- NBTByte(Sleeping)
- NBTShort(Air)
- NBTShort(AttackTime)
- NBTShort(DeathTime)
- NBTShort(Fire): Ticks until the player is no longer on fire, or zero
- NBTShort(Health)
- NBTShort(HurtTime)
- NBTShort(SleepTimer)
- NBTInt(Dimension)
- NBTInt(foodLevel)
- NBTInt(foodTickTimer)
- NBTInt(playerGameType)
- NBTInt(XpLevel)
- NBTInt(XpTotal)
- NBTFloat(FallDistance)
- NBTFloat(foodExhastionLevel)
- NBTFloat(foodSaturationLevel)
- NBTFloat(XpP)
- NBTCompound(Inventory)
- NBTCompound
- NBTByte(Count)
- NBTByte(Slot)
- NBTShort(Damage): Damage -or- metadata
- NBTShort(id)
- NBTCompound
- NBTList(Motion)
- NBTDouble
- NBTDouble
- NBTDouble
- NBTList(Pos)
- NBTDouble
- NBTDouble
- NBTDouble
- NBTList(Rotation)
- NBTFloat
- NBTFloat
[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(yPos): In global, world-relative chunk coordinates
- NBTLong(LastUpdate): The last time a block changed in this column
- NBTByteArray(Biomes)
- 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)
- NBTByteArray(Blocks)
- NBTByteArray(Data)
- NBTByteArray(SkyLight)
- NBTCompound
- NBTList(TileEntities)
- NBTIntArray(HeightMap)
- 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.