Diferencia entre revisiones de «Formato beta»

De WikiMinecraft
Saltar a: navegación, buscar
(Página creada con «{{construcción}} In Minecraft 1.0, each level is its own folder. A level folder is often identified by having a level.dat file, along with other ...»)
 
 
Línea 1: Línea 1:
 
{{construcción}}
 
{{construcción}}
 +
{{Traducir}}
 
In [[Minecraft 1.0]], each level is its own folder. A level folder is often identified by having a [[#level.dat_format|level.dat]] file, along with other subfolders to store the maps and regions of the level.
 
In [[Minecraft 1.0]], each level is its own folder. A level folder is often identified by having a [[#level.dat_format|level.dat]] file, along with other subfolders to store the maps and regions of the level.
  

Revisión actual del 21:18 28 dic 2014


Libro.png
Falta por traducir el artículo o parte,
para así facilitar la comprensión a los lectores
de habla hispana.

Traducir el artículo


In Minecraft 1.0, each level is its own folder. A level folder is often identified by having a level.dat file, along with other subfolders to store the maps and regions of the level.

Level folders will always contain the items in bold, and will sometimes contain the items in italics.

Relative Path Article Description
/level.dat (below) Stores global information about the level.
/level.dat_mcr - A backup of the level.dat file before conversion from MCRegion to Anvil.
/level.dat_old - A backup of the level.dat file before conversion from the Alpha Level Format to MCRegion or Anvil.
/session.lock (below) Used to give write access to the last program to modify this file.
/players/<player>.dat Player.dat Format Stores the individual states of the players that have played on this level, for versions before 1.7.6.
/playerdata/<uuid>.dat Player.dat Format Stores the individual states of the players that have played on this level, since 1.7.6.
/data/idcounts.dat
/data/map_<#>.dat
Map Item Format Stores the map data for the craftable Map items.
/data/villages.dat
/data/villages_nether.dat
/data/villages_end.dat
villages.dat Format Stores information about the Villages in the world. The "nether" and "end" files have been added in 1.8.
/data/Village.dat
/data/Fortress.dat
/data/Temple.dat
/data/Mineshaft.dat
/data/Stronghold.dat
Generated structures data file format Stores information about the generation of various Generated structures in the world.
/region/ - Contains region files for The Overworld.
/DIM-1/region/ - Contains region files for The Nether.
/DIM1/region/ - Contains region files for The End.
/region/r.<#>.<#>.mca
/DIM-1/region/r.<#>.<#>.mca
/DIM1/region/r.<#>.<#>.mca
Anvil file format Individual region files.
/region/r.<#>.<#>.mcr
/DIM-1/r.<#>.<#>.mcr
/DIM1/r.<#>.<#>.mcr
Region file format Backups of the region files before conversion from MCRegion to Anvil.
/<#>/<#>/c.<#>.<#>.dat Alpha Level Format Backups of the chunk files before conversion from the Alpha level format to MCRegion.

level.dat format

The level.dat file contains global information about the world such as the time of day, the singleplayer player, the level generator used, and the seed. It is an NBT file with this structure:

  • Nbtsheet.png
    The root tag.
    • Nbtsheet.png
       Data: This tag contains all the level data.
      • Nbtsheet.png
         version: The NBT version of the level, 19133.
      • Nbtsheet.png
         initialized: 1 or 0 (true/false) - Normally true after a world has been initialized properly after creation. If the initial simulation was canceled somehow, this can be false and the world will be re-initialized on next load.
      • Nbtsheet.png
         LevelName: The name of the level.
      • Nbtsheet.png
         generatorName: The name of the generator; "default", "flat", "largeBiomes", "amplified", "customized", or "debug_all_block_states". Not case sensitive, but always written in the case here.
      • Nbtsheet.png
         generatorVersion: The version of the level generator. The effects of changing this are unknown, but values other than 0 have been observed.
      • Nbtsheet.png
         generatorOptions: Controls options for the world generator. Used only if the world type is Superflat or Customized. The format for Superflat is a comma separated list of block IDs from the bottom of the map up, and each block ID may optionally be preceded by the number of layers and an x. Damage values are not supported.[1] The format for Customized is an extremely long String which has name:value pairs resembling JSON.
      • Nbtsheet.png
         RandomSeed: The random level seed used to generate consistent terrain.
      • Nbtsheet.png
         MapFeatures: 1 or 0 (true/false) - true if the map generator should place structures such as villages, strongholds, and mineshafts. Defaults to 1. Always 1 if the world type is Customized.
      • Nbtsheet.png
         LastPlayed: The Unix time when the level was last loaded.
      • Nbtsheet.png
         SizeOnDisk: The estimated size in bytes of the level. Currently not modified or used by Minecraft, but was previously.
      • Nbtsheet.png
         allowCommands: 1 or 0 (true/false) - true if cheats are enabled.
      • Nbtsheet.png
         hardcore: 1 or 0 (true/false) - true if the player must delete their world on death in singleplayer. Affects all three game modes.
      • Nbtsheet.png
         GameType: The default game mode for the singleplayer player when they initially spawn. 0 is Survival Mode, 1 is Creative Mode, 2 is Adventure Mode, 3 is Spectator Mode. Note: Singleplayer worlds do not use this field to save which game mode the player is currently in.
      • Nbtsheet.png
         Difficulty: The current difficulty setting. 0 is Peaceful, 1 is Easy, 2 is Normal, and 3 is Hard. Defaults to 2.
      • Nbtsheet.png
         DifficultyLocked: 1 or 0 (true/false) - True if the difficulty has been locked. Defaults to 0.
      • Nbtsheet.png
         Time: The number of ticks since the start of the level.
      • Nbtsheet.png
         DayTime: The time of day. 0 is sunrise, 6000 is mid day, 12000 is sunset, 18000 is mid night, 24000 is the next day's 0. This value keeps counting past 24000 and does not reset to 0.
      • Nbtsheet.png
         SpawnX: The X coordinate of the world spawn.
      • Nbtsheet.png
         SpawnY: The Y coordinate of the world spawn.
      • Nbtsheet.png
         SpawnZ: The Z coordinate of the world spawn.
      • Nbtsheet.png
         BorderCenterX: Center of the world border on the X coordinate. Defaults to 0.
      • Nbtsheet.png
         BorderCenterZ: Center of the world border on the Z coordinate. Defaults to 0.
      • Nbtsheet.png
         BorderSize: Width of the border. Defaults to 60000000.
      • Nbtsheet.png
         BorderSafeZone: Defaults to 5.
      • Nbtsheet.png
         BorderWarningBlocks: Defaults to 5.
      • Nbtsheet.png
         BorderWarningTime: Defaults to 15.
      • Nbtsheet.png
         BorderSizeLerpTarget: Defaults to 60000000.
      • Nbtsheet.png
         BorderSizeLerpTime: Defaults to 0.
      • Nbtsheet.png
         BorderDamagePerBlock: Defaults to 0.2.
      • Nbtsheet.png
         raining: 1 or 0 (true/false) - true if the level is currently experiencing rain, snow, and cloud cover.
      • Nbtsheet.png
         rainTime: The number of ticks before "raining" is toggled and this value gets set to another random value.
      • Nbtsheet.png
         thundering: 1 or 0 (true/false) - true if the rain/snow/cloud cover is a lightning storm and dark enough for mobs to spawn under the sky.
      • Nbtsheet.png
         thunderTime: The number of ticks before "thundering" is toggled and this value gets set to another random value.
      • Nbtsheet.png
         clearWeatherTime:
      • Nbtsheet.png
         Player: The state of the Singleplayer player. This overrides the <player>.dat file with the same name as the Singleplayer player. This is only saved by Servers if it already exists, otherwise it is not saved for server worlds. See Player.dat Format.
      • Nbtsheet.png
         GameRules: The game rules. Each rule is a string that is either "true" or "false" (except for randomTickSpeed, which uses numbers).
        • Nbtsheet.png
           commandBlockOutput: Whether or not actions performed by command blocks are displayed in the chat. True by default.
        • Nbtsheet.png
           doDaylightCycle: Whether to do the Daylight Cycle or not. True by default.
        • Nbtsheet.png
           doFireTick: Whether to spread or remove fire. True by default.
        • Nbtsheet.png
           doMobLoot: Whether mobs should drop loot when killed. True by default.
        • Nbtsheet.png
           doMobSpawning: Whether mobs should spawn naturally. True by default.
        • Nbtsheet.png
           doTileDrops: Whether breaking blocks should drop the block's item drop. True by default.
        • Nbtsheet.png
           keepInventory: Whether players keep their inventory after they die. False by default.
        • Nbtsheet.png
           logAdminCommands: Whether to log admin commands to server log. True by default.
        • Nbtsheet.png
           mobGriefing: Whether mobs can destroy blocks (creeper explosions, zombies breaking doors, etc.). True by default.
        • Nbtsheet.png
           naturalRegeneration: Whether the player naturally regenerates health if hunger is high enough. True by default.
        • Nbtsheet.png
           randomTickSpeed: How often a random tick occurs, such as plant growth, leaf decay, etc. 3 by default.
        • Nbtsheet.png
           sendCommandFeedback: Whether the feedback from commands executed by a player should show up in chat. True by default.
        • Nbtsheet.png
           showDeathMessages: Whether a message appears in chat when a player dies. True by default.

session.lock format

This file contains the timestamp of when the level was last accessed. The file contains a single 64-bit integer in big endian format, which is the timestamp, stored as the number of milliseconds elapsed since 1970, in UTC.

Unlike typical lock files, this file ensures that the last program to access the level is that one that has read and write access. The process goes something like this:

  1. Program opens session.lock
  2. Program writes timestamp to session.lock
  3. Program monitors session.lock for changes
  4. If the contents of session.lock change, program aborts and gives up its lock on the level.

Minecraft can sometimes try to hold the lock on a level even after the player has started playing a different level, and this can cause strange behavior. It is recommended to ensure that Minecraft is closed before trying to acquire a lock on a level.

References

  1. http://www.reddit.com/r/Minecraft/comments/ywjbk/superflat_customization/c5zusxl