提供: Minecraft Wiki
移動先: 案内検索

<player>.dat files are used by servers to store the state of individual players. The format is also used within level.dat files to store the state of the singleplayer player, which overrides any <player>.dat files with the same name as the singleplayer player. These files are in NBT format.

NBT の構造[編集 | ソースを編集]

  • Nbtsheet.png ルートタグ。level.datファイルでは、このタグは "Player"と呼ばれる。
    • idCustomName、および CustomNameVisible のタグを除くエンティティのすべてのタグ。
    • HandItemsArmorItemsDropChancesCanPickUpLootPersistenceRequiredLeashed、および Leash のタグを除く Mob のすべてのタグ。
    • Nbtsheet.png DataVersion: プレイヤーの NBT の構造のバージョン。
    • Nbtsheet.png Dimension: プレイヤーが存在するディメンション。-1はネザー、0はオーバーワールド、1はエンドである。 他の値は0と解釈される。
    • Nbtsheet.png playerGameType: プレイヤーのゲームモード。0はサバイバル、1はクリエイティブ、2はアドベンチャー、そして3はスペクテイターである。
    • Nbtsheet.png Score: スコアは死亡時に表示される。
    • Nbtsheet.png SelectedItemSlot: プレイヤーの選択したホットバーのスロット。
    • Nbtsheet.png SelectedItem: Slot タグを除き、プレイヤーが現在所持しているアイテムのデータ。
    • Nbtsheet.png SpawnX: 下記参照
    • Nbtsheet.png SpawnY: 存在しない可能性がある。このタグはプレイヤーのベッドの座標であり、プレイヤーがこれらの座標でスポーンするための有効なベッドがない状態でリスポーンを試みた場合にのみ削除される。これらのタグは、これらの座標でベッドを壊すことや、プレイヤーの死によっての影響は受けない。
    • Nbtsheet.png SpawnZ: 上記参照
    • Nbtsheet.png SpawnForced: 1または0 (true/false) - true は、ベッドが見つからなくても上記の座標でスポーンする必要がある場合を指す。
    • Nbtsheet.png Sleeping: 1または0 (true/false) - true に設定すると、プレイヤーがベッドにいた場合、 ログイン時にプレイヤーがベッドの中にいるかどうかには影響しない。
    • Nbtsheet.png SleepTimer: プレイヤーがベッドにいたティック数。 効果はない。
    • Nbtsheet.png foodLevel: 満腹度ゲージの値、20が最大。満腹度を参照。
    • Nbtsheet.png foodExhaustionLevel: 満腹度を参照
    • Nbtsheet.png foodSaturationLevel: 満腹度を参照
    • Nbtsheet.png foodTickTimer: 満腹度を参照
    • Nbtsheet.png XpLevel: 経験値ゲージに表示されるレベル。
    • Nbtsheet.png XpP: 経験値ゲージの次のレベルまでの進捗率/パーセント。
    • Nbtsheet.png XpTotal: プレイヤーが収集した経験値の総量。 死亡時のスコアに使用される。
    • Nbtsheet.png XpSeed: The seed used for the next enchantment in enchantment tables.
    • Nbtsheet.png Inventory: このリストの各 compound タグは、プレイヤーのインベントリのアイテムである(注:インベントリ内が空の場合、リストタイプが予期せぬ値になる可能性がある)。
    • Nbtsheet.png インベントリ内のアイテムには、Slot タグが含まれる
    • Nbtsheet.png EnderItems: このリストの各 compound タグは、27個のスロットがあるプレイヤーのエンダーチェストのインベントリ内のアイテムである(注:チェスト内が空の場合、リストタイプが予期せぬ値になる可能性がある)。
      • Nbtsheet.png インベントリ内のアイテムには、Slot タグが含まれる。スロットには0〜26の番号が付けられている。
    • Nbtsheet.png abilities: プレイヤーの能力。
      • Nbtsheet.png walkSpeed: 歩行速度、常に0.1。
      • Nbtsheet.png flySpeed: 飛行速度、常に0.05。
      • Nbtsheet.png mayfly: 1または0 (true/false) - true はプレイヤーが飛べる場合を指す。
      • Nbtsheet.png flying: 1または0 (true/false) - true はプレイヤーが飛んでいる場合を指す。
      • Nbtsheet.png invulnerable: 1または0 (true/false) - true はプレイヤーが、奈落のダメージを除く全てのダメージの影響を受けない場合(/kill コマンドによるダメージは奈落ダメージと同じ扱い)を指す。
      • Nbtsheet.png mayBuild: 1または0 (true/false) - true はプレイヤーがブロックを設置、破壊できる場合を指す。
      • Nbtsheet.png instabuild: 1または0 (true/false) - true はプレイヤーがすぐにブロックを破壊することができる場合を指す。
    • Nbtsheet.png RootVehicle: プレイヤーが乗っているルートエンティティ。
      • Nbtsheet.png AttachLeast: プレイヤーが乗っているエンティティの UUID の最小値。
      • Nbtsheet.png AttachMost: プレイヤーが乗っているエンティティの UUID の最大値。
      • Nbtsheet.png Entity: ルートエンティティの NBTデータ。
    • Nbtsheet.png ShoulderEntityLeft: プレイヤーの左肩にいるエンティティ。 常にオウムのように表示される。
    • Nbtsheet.png ShoulderEntityRight: プレイヤーの右肩にいるエンティティ。 常にオウムのように表示される。
    • Nbtsheet.png seenCredits: 1または0 (true/false) - true はプレイヤーがエンドポータルを介してオーバーワールドに移動した場合を指す。
    • Nbtsheet.png recipeBook: プレイヤーがロックを解除したレシピを詳述する JSON オブジェクトが含まれている。

Item structure[編集 | ソースを編集]

Items are used both in the player's inventory and Ender inventory, and in chest tile entities, dropped item entities, furnace tile entities, brewing stand tile entities, and Villager trading recipes. Sometimes a Slot tag is used to specify the slot the item is in, such as with chests; other times there is no Slot tag, such as with dropped items.

  • Nbtsheet.png The item's root tag. Some instances may give this tag a name, other times it is nameless because it is in a list.
    • Nbtsheet.png Count: Number of items stacked in this inventory slot. Any item can be stacked, including tools, armor, and vehicles. Range is -128 to 127. Values of 1 are not displayed in-game. Values below 1 are displayed in red.[note 1]
    • Nbtsheet.png Slot: May not exist. The inventory slot the item is in.
    • Nbtsheet.png Damage: The data value for this item. The name "Damage" comes from when only tools used this value, now many other items use this value for other purposes. For blocks, it is the 4-bit "block data" tag that determines a variant of the block. Defaults to 0.
    • Nbtsheet.png id: Item/Block ID (This is a Short tag prior to 1.8.) If not specified, Minecraft changes the item to stone (setting ID to 1 and Damage to 0, and ignoring any existing Damage value) when loading the chunk or summoning the item .
    • Nbtsheet.png tag: Additional information about the item, discussed in the below sections. This tag is optional for most items.
  1. A value of zero means the item will disappear when you try to use or drop it, but it can still be crafted with, or fired in the case of arrows, as though it were a stack of 1.
    A negative value is similar except that the item can be used by right-clicking, can be used until it wears out if it is a tool or bow (but will break if you use it as a melee weapon). This can let the count go below -128, but it will wrap around (by adding the nearest multiple of 256) when the server restarts or the single-player game is saved and reopened. The same applies if two negative stacks are combined. If Q is pressed while holding a negative stack, it will drop all at once and appear as a normal dropped item, but it will be impossible to pick up.
    A stack of more than 64 may decrease if moved to or from a container, or the mouse pointer may drop only as many as normally fill a stack and continue to hold the remainder. A stack of N damaged tools used until "they" break will become N – 1 intact tools, but if the stack is split then both tools keep their damage.

General Tags[編集 | ソースを編集]

Items with durability can be made unbreakable and will never lose any durability. Additionally, items can have specifications for Adventure mode to describe which blocks may be broken with them.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png Unbreakable: 1 or 0 (true/false) - if true, the item doesn't lose durability when used.
    • Nbtsheet.png CanDestroy: The only blocks this item may break when used by a player in adventure mode.
      • Nbtsheet.png: The block ID.

Block Tags[編集 | ソースを編集]

Blocks can be given tags to specify what blocks they may be placed against in Adventure mode, and to specify what Tile Entity NBT tags to apply to them when placed.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png CanPlaceOn: Determines which blocks that blocks with this tag can be placed against in adventure mode.
      • Nbtsheet.png: The block ID.
    • Nbtsheet.png BlockEntityTag: Block entity NBT tags which are applied when this block is placed.[1] Used to store data on banners and shields or on blocks obtained in creative by holding ctrl (or ⌘ Cmd on mac) and pressing pick block on a block containing a block entity.

Enchantments[編集 | ソースを編集]

There are two ways enchantments are associated with items; the first way is that the item is actually enchanted and the enchantment affects the behavior of the item, and the second way is that the item is an enchanted book which simply stores the enchantments without actually affecting the behavior of the item. There is also the RepairCost tag which tracks anvil usage for items, making them more costly with every use of the anvil.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png ench: Contains enchantments on this item that affect the way the item works.
      • Nbtsheet.png: A single enchantment.
        • Nbtsheet.png id: ID of the enchantment.
        • Nbtsheet.png lvl: Level of the enchantment, where 1 is level 1.
    • Nbtsheet.png StoredEnchantments: Contains enchantments for enchanted books.
      • Nbtsheet.png: A stored enchantment, identical structure to each enchantment in ench.
    • Nbtsheet.png RepairCost: Number of enchantment levels to add to the base level cost when repairing, combining, or renaming this item with an Anvil.

StoredEnchantments tooltips will not be displayed if edited onto an item other than an enchanted book. Enchantments stored in ench, however, will always be displayed in the tooltip and will cause the item to glow, even if they cannot have any effect.

Attribute Modifiers[編集 | ソースを編集]

All items can be given Modifiers which affect various Attributes of the player/mob which wears or holds them. Note that if an item has vanilla default AttributeModifiers, these will cease to exist if this tag is added (e.g. a Diamond Sword given an empty AttributeModifiers list will no longer provide a boost to damage). Also note that the default vanilla AttributeModifiers do not actually use this tag, and as such, it will not appear on a natural item.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png AttributeModifiers: Contains Attribute Modifiers on this item which modify Attributes of the wearer or holder (if the item is not in the hand or armor slots, it will have no effect).
      • Nbtsheet.png: A single Attribute Modifier.
        • Nbtsheet.png AttributeName: The name of the Attribute this Modifier is to act upon.
        • Nbtsheet.png Name: Name of the Modifier
        • Nbtsheet.png Slot: Slot the item must be in for the modifier to take effect. "mainhand", "offhand", "feet", "legs", "chest", or "head".
        • Nbtsheet.png Operation: Modifier Operation. See Attribute Modifiers for info.
        • Nbtsheet.png Amount: Amount of change from the modifier.
        • Nbtsheet.png UUIDMost: Uppermost bits of the modifier's UUID.
        • Nbtsheet.png UUIDLeast: Lowermost bits of the modifier's UUID.

Potion Effects[編集 | ソースを編集]

Potions, splash potions, lingering potions and tipped arrows can have multiple, customized effects via the CustomPotionEffects tag. These effects are added to the default effect under the Potion tag if present. In addition the color can be overridden with the CustomPotionColor tag.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png CustomPotionEffects: The custom Potion effects this potion has.
      • Nbtsheet.png One of these for each effect.
        • Nbtsheet.png Id: The ID of the effect.
        • Nbtsheet.png Amplifier: The amplifier of the effect, with 0 being level 1.
        • Nbtsheet.png Duration: The duration of the effect in ticks.
        • Nbtsheet.png Ambient: 1 or 0 (true/false) - whether or not this is an effect provided by a beacon and therefore should be less intrusive on the screen. This tag is optional and defaults to 0. Due to a bug, it has no effect on splash potions.
        • Nbtsheet.png ShowParticles: 1 or 0 (true/false) - whether or not this effect produces particles. This tag is optional and defaults to 1. Due to a bug, it has no effect on splash potions.
    • Nbtsheet.png Potion: The name of the default potion effect. This name differs from the potion effect name. For example, the value for an "Instant Health II" potion is "minecraft:strong_healing".
    • Nbtsheet.png CustomPotionColor: The overrides the color of the potion, to be the prescribed color (same format as leather armor colors below).

Display Properties[編集 | ソースを編集]

Leather armor can be colored, and all items can have custom display names and lore. Various tooltips can also be hidden.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png display: Display properties.
      • Nbtsheet.png color: The color of the leather armor. The tooltip will display "Dyed" if advanced tooltips are disabled or will otherwise display the hexadecimal color value. Color codes are calculated from the Red, Green and Blue components using this formula:
        Red<<16 + Green<<8 + Blue[note 1]
      • Nbtsheet.png Name: The name to display for an item.
      • Nbtsheet.png LocName: A localization string to translate (e.g. gui.toTitle).
      • Nbtsheet.png Lore: List of strings to display as lore for the item.[2]
        • Nbtsheet.png A line of text for the lore of an item.
    • Nbtsheet.png HideFlags: Bit field determining which parts of the tooltip to hide on an item. 1 for "ench", 2 for "AttributeModifiers", 4 for "Unbreakable", 8 for "CanDestroy", 16 for "CanPlaceOn", and 32 for various other information (including potion effects, "StoredEnchantments", written book "generation" and "author", "Explosion", "Fireworks", and map tooltips). For example, setting to 3 would hide both "ench" and "AttributeModifiers" tags, and setting to 63 would hide everything.
  1. For positive values larger than 0x00FFFFFF, the top byte is ignored. All negative values produce white.

Written Books[編集 | ソースを編集]

Both book and quill and written book use the tag tag to store information about the book. Only written books store the title, author, and generation of the book; pages is stored in both varieties.

Player Heads[編集 | ソースを編集]

Heads of the player variety can be associated with a specific username to take on the skin of that player when placed. The hand-held item is also updated with the new skin. Within this section, the "owner" of a head means the player whose head it is a copy of, and a player whose inventory contains a head is called the "holder".

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png SkullOwner (deprecated since 1.8): The username of the player this is a skull of for pre-1.8. Note that SkullOwner is for the item in inventories, whereas ExtraType is for skull blocks placed on the ground.[3]
    • Nbtsheet.png SkullOwner: definition for the skull's owner. Note that Owner is used for skulls placed on the ground.
      • Nbtsheet.png Id: UUID of owner. Optional. Used to update the other tags when the chunk loads or the holder logs in, in case the owner's name has changed.
      • Nbtsheet.png Name: Username of owner. If missing or empty, the head will appear as a Steve head. Otherwise, used to store or retrieve the downloaded skin in the cache. Need not be a valid player name, but must not be all spaces.
      • Nbtsheet.png Properties
        • Nbtsheet.png textures
          • Nbtsheet.png: An individual texture.
            • Nbtsheet.png Signature: Optional.
            • Nbtsheet.png Value: A Base64-encoded JSON object.[4]
              • Nbtsheet.png timestamp: Optional: Unix time in milliseconds.
              • Nbtsheet.png profileId: Optional: Player UUID without hyphens.
              • Nbtsheet.png profileName: Optional: Player name.
              • Nbtsheet.png isPublic: Optional.
              • Nbtsheet.png textures
                • Nbtsheet.png SKIN
                  • Nbtsheet.png url: URL of a player skin on[note 1]
                • Nbtsheet.png CAPE: Optional.
                  • Nbtsheet.png url: URL of a player cape (64x32 PNG).
  1. Could be a URL on a non-Mojang site until 1.8.4, but couldn't be a data: or file: URI.

Fireworks[編集 | ソースを編集]

Fireworks use the tag tag to store information about their effects.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png Explosion: One of these may appear on a firework star.
      • Nbtsheet.png Flicker: 1 or 0 (true/false) - true if this explosion will have the Twinkle effect (glowstone dust). May be absent.
      • Nbtsheet.png Trail: 1 or 0 (true/false) - true if this explosion will have the Trail effect (diamond). May be absent.
      • Nbtsheet.png Type: The shape of this firework's explosion. 0 = Small Ball, 1 = Large Ball, 2 = Star-shaped, 3 = Creeper-shaped, 4 = Burst. Other values will be named "Unknown Shape" and render as Small Ball.
      • Nbtsheet.png Colors: Array of integer values corresponding to the primary colors of this firework's explosion. If custom color codes are used, the game will render it as "Custom" in the tooltip, but the proper color will be used in the explosion. Custom colors are integers in the same format as the color tag from Display Properties.
      • Nbtsheet.png FadeColors: Array of integer values corresponding to the fading colors of this firework's explosion. Same handling of custom colors as Colors. May be absent.
    • Nbtsheet.png Fireworks: One of these may appear on a firework rocket.
      • Nbtsheet.png Flight: Indicates the flight duration of the firework (equals the amount of gunpowder used in crafting the rocket). While this value can be anything from -128 to 127, values of -2 and under almost never detonate at all.
      • Nbtsheet.png Explosions: List of compounds representing each explosion this firework will cause.
        • Nbtsheet.png Same format as 'Explosion' compound on a firework star, as described above.

Armor stands and spawn eggs[編集 | ソースを編集]

Armor stands and spawn eggs may contain potential entity data.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png EntityTag: Stores entity data that is applied to the armor stand when placed or entity when spawned.

Maps[編集 | ソースを編集]

Maps may be scaled.

  • Nbtsheet.png tag: The tag tag.
    • Nbtsheet.png map_scale_direction: Only internally used when scaling a map, after that directly removed: The amount to increase the current map scale by when crafting. Always 1.
    • Nbtsheet.png map_tracking_position: Only internally used when scaling a map, after that directly removed: 1 or 0 (true/false) - whether or not player markers should be added and updated. Currently unused.
    • Nbtsheet.png Decorations: A list of optional decorations. It will display defined symbols on the map
      • Nbtsheet.png An individual Decoration
        • Nbtsheet.png id: Identifier of the symbols
        • Nbtsheet.png type: Type of the symbol (see textures/map/map_icons.png)
        • Nbtsheet.png x: X position
        • Nbtsheet.png z: Z position
        • Nbtsheet.png rot: Rotation of the symbol, value from 0.0 to 360.0. The value 0 rotates the symbol to the bottom end of the map. The symbol is rotated clock-wise.
    • Nbtsheet.png display: The display tag.
      • Nbtsheet.png MapColor: The color of the markings on the item's texture.

Notes[編集 | ソースを編集]

Inventory slot numbers[編集 | ソースを編集]

This shows the numbers used to specify the slot in the inventory while editing with an NBT editor.

The off-hand slot is #−106.

History[編集 | ソースを編集]

Java Edition
1.8 14w06a Added CanDestroy for tools.
Added HideFlags to items.
14w07a Added BlockEntityTag for all blocks.
14w10a Added a 5th bit (value of 32) to HideFlags that hides potion effects.
14w33a Added SelectedItem for all items.

References[編集 | ソースを編集]

  1. Assuming the block is of a type that creates a block entity at all. If not, BlockEntityTag has no effect.
  4. FVBico and Steven W.d.V.'s comments on MC-51003.