Minecraft Wiki
(Compound,Listを訳しました。)
M7iki2suke8c (トーク | 投稿記録)
(ミスの除去)
タグ: ビジュアルエディタ
(3人の利用者による、間の5版が非表示)
1行目: 1行目:
 
{{about|NBT ファイルフォーマット|コマンドでのNBTの使用|チュートリアル/コマンドNBTタグ}}'''NBTフォーマット'''(The Named Binary Tag format)はMinecraftでデータをファイルに保存するのに使われる。このフォーマットをNotchが簡潔に説明している[http://web.archive.org/web/20110723210920/http://www.minecraft.net/docs/NBT.txt specification]。このフォーマットは様々な"タグ"からなるツリー構造でデータを蓄えている。全てのタグはIDとnameを持っている。元の基地のバージョンは、[[Minecraft Beta]] 1.3で導入された、19132であったが、その後[[Anvilファイルフォーマット|Anvil]]で19133に更新されInt Arrayタグが追加された。NBT形式は、[[Minecraft Indev]]のタグ0~10を使用する。
{{about|NBT ファイルフォーマット|コマンドでのNBTの使用|チュートリアル/コマンドNBTタグ}}
 
{{要翻訳|stub=1}}
 
 
'''NBTフォーマット'''(The Named Binary Tag format)はマインクラフトでデータをファイルに保存するのに使われる。このフォーマットをNotchが簡潔に説明している[http://web.archive.org/web/20110723210920/http://www.minecraft.net/docs/NBT.txt specification]。このフォーマットは様々な"タグ"からなるツリー構造でデータを蓄えている。全てのタグはIDとnameを持っている。The original known version was 19132 as introduced in [[Minecraft Beta]] 1.3, and since then has been updated to 19133 with [[Anvil file format|Anvil]], with the addition of the Int Array tag.The NBT format dates all the way back to [[Minecraft Indev]] with tags 0 to 10 in use.
 
   
 
== タグ定義 ==
 
== タグ定義 ==
タグはデータツリーの一部分である。タグの最初のバイトはタグタイプIDである。続いて2バイトがnameの長さで、それからnameがUTF-8フォーマットで続いている(注意: TAG_'''End'''に名前は無いので2バイトは必要ない、名前が空であると仮定されている)。タグnameにもしかしたらスペースがあるかもしれない、だがマインクラフト自身はけっしてnameにスペースを含めタグを保存することはない。最終的にタグのタイプによりタグのペイロードバイトが続く。このテーブルはNBTFormat19133バージョンにおける12のタグの説明である。
+
タグはデータツリーの一部分である。タグの最初のバイトはタグタイプIDである。続いて2バイトがnameの長さで、それからnameがUTF-8フォーマットで続いている(注意: TAG_'''End'''に名前は無いので2バイトは必要ない、名前が空であると仮定されている)。タグnameにもしかしたらスペースがあるかもしれない、だがMinecraft自身はけっしてnameにスペースを含めタグを保存することはない。最終的にタグのタイプによりタグのペイロードバイトが続く。このテーブルはNBTFormat19133バージョンにおける12のタグの説明である。
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
 
! ID
 
! ID
  +
! アイコン
! Icon
 
  +
! タグの種類
! Tag Type
 
  +
! ペイロード
! Payload
 
  +
! 説明
! Description
 
! width="33%" align="center" | Storage Capacity
+
! width="33%" align="center" | ストレージ容量
 
|-
 
|-
 
| style="text-align:center" | '''0'''
 
| style="text-align:center" | '''0'''
25行目: 22行目:
 
| style="text-align:center" | {{nbt|byte}}
 
| style="text-align:center" | {{nbt|byte}}
 
| TAG_'''Byte'''
 
| TAG_'''Byte'''
  +
| 1バイト/8ビット符号付き
| 1 byte / 8 bits, signed
 
 
| 符号付整数型 しばしば真偽値を表すのにも使用される
 
| 符号付整数型 しばしば真偽値を表すのにも使用される
| 範囲 -(2<sup>7</sup>) to (2<sup>7</sup> - 1)<br>(-128 to 127)
+
| 範囲 -(2<sup>7</sup>)から(2<sup>7</sup> - 1)<br>(-128から127)
 
|-
 
|-
 
| style="text-align:center" | '''2'''
 
| style="text-align:center" | '''2'''
 
| style="text-align:center" | {{nbt|short}}
 
| style="text-align:center" | {{nbt|short}}
 
| TAG_'''Short'''
 
| TAG_'''Short'''
  +
| 2バイト/16ビット符号付きビッグエンディアン
| 2 bytes / 16 bits, signed, big endian
 
 
| 符号付整数型
 
| 符号付整数型
| 範囲 -(2<sup>15</sup>) to (2<sup>15</sup> - 1)<br>(-32,768 to 32,767)
+
| 範囲 -(2<sup>15</sup>)から(2<sup>15</sup> - 1)<br>(-32,768から32,767)
 
|-
 
|-
 
| style="text-align:center" | '''3'''
 
| style="text-align:center" | '''3'''
 
| style="text-align:center" | {{nbt|int}}
 
| style="text-align:center" | {{nbt|int}}
 
| TAG_'''Int'''
 
| TAG_'''Int'''
  +
| 4バイト/32ビット符号付きビッグエンディアン
| 4 bytes / 32 bits, signed, big endian
 
 
| 符号付整数型
 
| 符号付整数型
| 範囲 -(2<sup>31</sup>) to (2<sup>31</sup> - 1)<br>(-2,147,483,648 to 2,147,483,647)
+
| 範囲 -(2<sup>31</sup>)から(2<sup>31</sup> - 1)<br>(-2,147,483,648から2,147,483,647)
 
|-
 
|-
 
| style="text-align:center" | '''4'''
 
| style="text-align:center" | '''4'''
 
| style="text-align:center" | {{nbt|long}}
 
| style="text-align:center" | {{nbt|long}}
 
| TAG_'''Long'''
 
| TAG_'''Long'''
  +
| 8バイト/64ビット符号付きビッグエンディアン
| 8 bytes / 64 bits, signed, big endian
 
 
| 符号付整数型.
 
| 符号付整数型.
| 範囲 -(2<sup>63</sup>) to (2<sup>63</sup> - 1)<br>(-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807)
+
| 範囲 -(2<sup>63</sup>)から(2<sup>63</sup> - 1)<br>(-9,223,372,036,854,775,808から9,223,372,036,854,775,807)
 
|-
 
|-
 
| style="text-align:center" | '''5'''
 
| style="text-align:center" | '''5'''
 
| style="text-align:center" | {{nbt|float}}
 
| style="text-align:center" | {{nbt|float}}
 
| TAG_'''Float'''
 
| TAG_'''Float'''
| 4 bytes / 32 bits, signed, big endian, IEEE 754-2008, binary32
+
| 4バイト/32ビット符号付きビッグエンディアン, IEEE 754-2008, バイナリ32
 
| 符号付浮動小数点数.
 
| 符号付浮動小数点数.
| Precision varies throughout number line;<br>See [[wikipedia:Single precision floating-point format|Single-precision floating-point format]]. 最大値 3.4*10<sup>38</sup>
+
| 精度は数字の行全体で異なる:<br>[[wikipedia:en:Single precision floating-point format|Single-precision floating-point format]]参照。最大値3.4*10<sup>38</sup>
 
|-
 
|-
 
| style="text-align:center" | '''6'''
 
| style="text-align:center" | '''6'''
 
| style="text-align:center" | {{nbt|double}}
 
| style="text-align:center" | {{nbt|double}}
 
| TAG_'''Double'''
 
| TAG_'''Double'''
| 8 bytes / 64 bits, signed, big endian, IEEE 754-2008, binary64
+
| 8バイト/64ビット符号付きビッグエンディアンIEEE 754-2008, バイナリ64
 
| 符号付浮動小数点数
 
| 符号付浮動小数点数
| Precision varies throughout number line;<br>See [[wikipedia:Double precision floating-point format|Double-precision floating-point format]]. 最大値 1.8*10<sup>308</sup>
+
| 精度は数字の行全体で異なる:<br>[[wikipedia:en:Double precision floating-point format|Double-precision floating-point format]]参照。最大値 1.8*10<sup>308</sup>
 
|-
 
|-
 
| style="text-align:center" | '''7'''
 
| style="text-align:center" | '''7'''
100行目: 97行目:
 
| TAG_Intのペイロードで要素数、それからTAG_Intのペイロードが要素数分続く。
 
| TAG_Intのペイロードで要素数、それからTAG_Intのペイロードが要素数分続く。
 
| 4バイト整数配列
 
| 4バイト整数配列
| Maximum number of elements ranges between (2<sup>31</sup> - 9) and (2<sup>31</sup> - 1) (2,147,483,639 and 2,147,483,647), depending on the specific JVM.
+
| 特定のJVMに応じ、エレメントの最大数の範囲は(2<sup>31</sup> - 9)から(2<sup>31</sup> - 1) (2,147,483,639から2,147,483,647)
 
|}
 
|}
  +
ListおよびComponentタグは、再帰的にネストできる。また、リストのリストでは、サブリストのそれぞれが異なる種類のタグをリストできる事に注意。
The List and Compound tags can be and often are recursively nested. It should also be noted that, in a list of lists, each of the sub-lists can list a different kind of tag.
 
 
注意:要素数や文字数を示す型は符号付きである。
 
注意:要素数や文字数を示す型は符号付きである。
   
== File Format ==
+
== Fileフォーマット ==
  +
NBTファイルは、GZipされた複合タグであり、名前とタグIDが含まれている。 Minecraftで使用されるファイルの一部は圧縮されていない場合があるが、ほとんどの場合、ファイルはNotchの元の仕様に従っており、GZipで圧縮されている。[[Xbox 360 Edition]]では、LZX圧縮アルゴリズムのバリエーションであるXMemCompressで[[チャンク]]が圧縮される。バージョンやその他の情報を指定するヘッダーはない。[[level.dat]]ファイルのみがバージョンを指定する。
An NBT file is a GZip'd Compound tag, name and tag ID included. Some of the files utilized by Minecraft may be uncompressed, but in most cases the files follow Notch's original specification and are compressed with GZip. In the [[Xbox 360 Edition]], [[chunks]] are compressed with XMemCompress, a variation of an LZX compression algorithm. There is no header to specify the version or any other information - only the [[level.dat]] file specifies the version.
 
   
== As used in Minecraft ==
+
== Minecraftで使用されるもの ==
  +
MinecraftのNBT形式の使用は時々奇妙である。場合によっては、空のリストは、正しい種類のリストではなく、バイトタグのリストとして、または新しいバージョンのMinecraftの終了タグのリストとして表されることがある。さらに、ほとんどすべてのルートタグには空の名前文字列があり、実際のデータと名前を持つ1つの複合タグのみをカプセル化する。 例えば:
Minecraft's use of the NBT format is odd at times. In some instances, empty lists may be represented as a list of Byte tags rather than a list of the correct type, or as a list of End tags in newer versions of Minecraft, which can break some older NBT tools. Additionally, almost every root tag has an empty name string and encapsulates only one Compound tag with the actual data and a name. For instance:
 
 
<div class="treeview">
 
<div class="treeview">
* {{nbt|compound}} The root tag for most Minecraft NBT structures.
+
* {{nbt|compound}} ほとんどのMinecraft NBT構造のルートタグ。
** {{nbt|compound|SomeName}}: The only tag contained within the root tag - it has a name and contains all the actual data.
+
**{{nbt|compound|SomeName}}: ルートタグ内に含まれる唯一のタグ - 名前があり、すべての実際のデータが含まれる。
 
</div>
 
</div>
  +
もう1つの注目すべき奇妙な点は、Notchによる元の仕様ではタグ名にスペースを使用できるが、例でもタグ名にスペースを使用しているにもかかわらず、Minecraftにはタグに名前にスペースが含まれる既知のファイルがないということである。また、大部分がlowerCamelCaseまたはUpperCamelCaseのいずれかであるが、場合によってはすべて小文字でもよいなど、大文字小文字の使用に一貫性がない。
Another noticeable oddity is that, although the original specification by Notch allows for spaces in tag names, and even the example uses spaces in the tag names, Minecraft has no known files where any tags have spaces in their names. There is also inconsistent use of letter case, mostly either lowerCamelCase or UpperCamelCase, but sometimes even in all lowercase.
 
   
=== Uses ===
+
=== 使用 ===
* [[level.dat]] is stored in compressed NBT format.
+
* [[level.dat]]は圧縮されたNBT形式で保存される
* [[Player.dat format|<player>.dat]] files are stored in compressed NBT format.
+
* [[Player.dat format|<player>.dat]]ファイルは圧縮されたNBT形式で保存される
* [[idcounts.dat]] is stored in uncompressed NBT format.
+
* [[idcounts.dat]]は非圧縮NBT形式で保存される
* [[villages.dat]] is stored in compressed NBT format.
+
* [[villages.dat]]は圧縮されたNBT形式で保存される
* [[Map item format|map_<#>.dat]] files are stored in compressed NBT format.
+
* [[Map item format|map_<#>.dat]]ファイルは圧縮されたNBT形式で保存される
* [[Servers.dat Format|servers.dat]], which is used to store the list of saved multiplayer servers as uncompressed NBT.
+
* [[Servers.dat Format|servers.dat]]は保存されたマルチプレイヤーサーバーのリストを非圧縮NBTとして保存するのに使用される
* [[Chunk format|Chunks]] are stored in compressed NBT format within [[Region file format|Region]] files.
+
*[[Chunk format|Chunks]]はRegionファイル内に圧縮されたNBT形式で保存される
* [[Scoreboard#NBT format|scoreboard.dat]] is stored in compressed NBT format.
+
* [[Scoreboard#NBT format|scoreboard.dat]]は圧縮されたNBT形式で保存される
* [[Generated structures data file format|Generated structures]] are stored in compressed NBT format.
+
* [[Generated structures data file format|Generated structures]]は圧縮されたNBT形式で保存される
   
== Software ==
+
== ソフトウェア ==
  +
Mojangは、開発者が[http://mojang.com/2012/02/new-minecraft-map-format-anvil/ McRegion -> Anvil converter]コンバーターのソースコードの一部として使用および参照するためのサンプルJava NBTクラスを提供している。これ以外に、コミュニティは圧縮および非圧縮のNBTファイルを表示および変更するプログラムを開発した。
Mojang has provided sample Java NBT classes for developers to use and reference as part of the source code for the [http://mojang.com/2012/02/new-minecraft-map-format-anvil/ McRegion -> Anvil converter]. Other than this, the community has developed programs to view and modify compressed and uncompressed NBT files:
 
 
{| class="wikitable" style="width: 100%"
 
{| class="wikitable" style="width: 100%"
 
|-
 
|-
! Name
+
! 名前
! NBT Version
+
! NBTバージョン
  +
! 説明
! Description
 
  +
! スクリーンショット
! Screenshot
 
 
|-
 
|-
 
| [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1261629-mineback-minecraft-automated-backup-single-player/ MineBack Ultimate]
 
| [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1261629-mineback-minecraft-automated-backup-single-player/ MineBack Ultimate]
 
| {{tc|yes|19133|style=text-align:center}}
 
| {{tc|yes|19133|style=text-align:center}}
  +
| MineBack Ultimateは、利用可能なすべてのタイプのNBT形式ファイル(マップ、レベル、ワールドなど)をサポートする完全なNBTエディターを提供する。最新のGUIと多くのヘルパー機能が付属している。
| MineBack Ultimate provides a full NBT editor supporting all available types of NBT format file (Map, Level, World etc.). It comes with a modern GUI and many helper functions.
 
 
|[[ファイル:MineBackNBTEditor.png|128px]]
 
|[[ファイル:MineBackNBTEditor.png|128px]]
 
|-
 
|-
 
| [http://www.minecraftforum.net/topic/6661-nbtedit/ NBTEdit]
 
| [http://www.minecraftforum.net/topic/6661-nbtedit/ NBTEdit]
 
| {{tc|no|19132|style=text-align:center}}
 
| {{tc|no|19132|style=text-align:center}}
  +
| Windowsツリーコントロールを介してNBTファイルを表示および変更できる。 NBTバージョンが遅れているだけでなく、同じ名前の複数のタグをサポートせず、一部の種類で誤った範囲を強制し、非圧縮のNBTファイルをサポートしていないため、時代遅れである。
| Allows for viewing and modifying NBT files via a Windows tree control. It is outdated not only from being an NBT version behind, but because it does not support multiple tags with the same name and it forces incorrect ranges on some types, and it lacks support for uncompressed NBT files.
 
 
| [[ファイル:NBTEdit Level.Dat.png|128px]]
 
| [[ファイル:NBTEdit Level.Dat.png|128px]]
 
|-
 
|-
 
| [[Programs and editors/NBTExplorer|NBTExplorer]] - [http://www.minecraftforum.net/topic/840677-nbtexplorer/ Forum Post]
 
| [[Programs and editors/NBTExplorer|NBTExplorer]] - [http://www.minecraftforum.net/topic/840677-nbtexplorer/ Forum Post]
 
| {{tc|yes|19133|style=text-align:center}}
 
| {{tc|yes|19133|style=text-align:center}}
  +
| このプログラムは、NBTEditに触発され、それに基づいており、Windowsツリーコントロールを介してNBTファイルを表示および編集できる。圧縮および非圧縮のNBTファイルをサポートし、[[MCRegion]]および[[Anvil file format|Anvil]]ファイル、[[level.dat]]などのNBT構造を直接編集できる。
| Inspired by and based on NBTEdit, this program allows viewing and editing of NBT files via a Windows tree control. It supports compressed and uncompressed NBT files, and allows for direct editing of the NBT structures in [[MCRegion]] and [[Anvil file format|Anvil]] files, [[level.dat]], etc.
 
 
| [[ファイル:NBTExplorer.png|128px]]
 
| [[ファイル:NBTExplorer.png|128px]]
 
|-
 
|-
 
| [http://www.minecraftforum.net/topic/2078055-nbt-decoding-grammar-for-synalyze-it-mac-os-x/ NBT grammar for Synalyze It!]
 
| [http://www.minecraftforum.net/topic/2078055-nbt-decoding-grammar-for-synalyze-it-mac-os-x/ NBT grammar for Synalyze It!]
 
| {{tc|no|19132|style=text-align:center}}
 
| {{tc|no|19132|style=text-align:center}}
  +
| これを使用すると、解析されたタグツリーとともに色分けされた16進ダンプが表示される。現在、非圧縮ファイルのみがサポートされている。
| Using this grammar Synalyze It! displays a color-coded hex dump along with the parsed tag tree. Currently only uncompressed files are supported.
 
 
| [[ファイル:Synalyze-It-NBT-decoded.png|128px]]
 
| [[ファイル:Synalyze-It-NBT-decoded.png|128px]]
 
|-
 
|-
 
| [http://www.minecraftforum.net/topic/63854-neinedit-nbt-editor-for-mac-os-x/ NEINedit]
 
| [http://www.minecraftforum.net/topic/63854-neinedit-nbt-editor-for-mac-os-x/ NEINedit]
 
| {{tc|no|19132|style=text-align:center}}
 
| {{tc|no|19132|style=text-align:center}}
  +
| テキストベースのツリー構造を備えたMac用のNBTエディター。
| NBT editor for mac with a text-based tree structure.
 
 
| [[ファイル:NEINedit.png|128px]]
 
| [[ファイル:NEINedit.png|128px]]
 
|-
 
|-
 
| [https://pypi.python.org/pypi/nbt2yaml/0.3.0 NBT2YAML]
 
| [https://pypi.python.org/pypi/nbt2yaml/0.3.0 NBT2YAML]
 
| {{tc|yes|19133|style=text-align:center}}
 
| {{tc|yes|19133|style=text-align:center}}
  +
| nbt2yamlは、カスタムYAML形式を使用してMinecraft NBTファイルを読み取りおよび編集するためのコマンドラインインターフェイスを提供しする。 また、単純なPythonデータ構造との間でNBTファイルを解析および書き込むためのPython APIも含まれている。
| nbt2yaml presents a command line interface for reading and editing Minecraft NBT files using a custom YAML format. It also includes a Python API for parsing and writing NBT files to/from a simple Python data structure.
 
 
|-
 
|-
 
| [https://irath96.github.io/webNBT/ webNBT]
 
| [https://irath96.github.io/webNBT/ webNBT]
 
| {{tc|yes|19133|style=text-align:center}}
 
| {{tc|yes|19133|style=text-align:center}}
  +
| webNBTは、ユーザーがアプリケーションをダウンロードしたり、サードパーティのブラウザープラグイン(FlashやJavaなど)を使用したりすることなく、最新のブラウザーで実行されるNBTエディターである
| webNBT is an NBT-editor that runs in modern browsers without requiring the user to download an application or use third-party browser plugins (like Flash or Java).
 
 
|
 
|
 
|}
 
|}
   
{{minecraft}}
+
{{Java Edition}}
   
 
[[de:NBT]]
 
[[de:NBT]]

2020年6月19日 (金) 09:51時点における版

この記事では、NBT ファイルフォーマットについて説明しています。コマンドでのNBTの使用については「チュートリアル/コマンドNBTタグ」をご覧ください。

NBTフォーマット(The Named Binary Tag format)はMinecraftでデータをファイルに保存するのに使われる。このフォーマットをNotchが簡潔に説明しているspecification。このフォーマットは様々な"タグ"からなるツリー構造でデータを蓄えている。全てのタグはIDとnameを持っている。元の基地のバージョンは、Minecraft Beta 1.3で導入された、19132であったが、その後Anvilで19133に更新されInt Arrayタグが追加された。NBT形式は、Minecraft Indevのタグ0~10を使用する。

タグ定義

タグはデータツリーの一部分である。タグの最初のバイトはタグタイプIDである。続いて2バイトがnameの長さで、それからnameがUTF-8フォーマットで続いている(注意: TAG_Endに名前は無いので2バイトは必要ない、名前が空であると仮定されている)。タグnameにもしかしたらスペースがあるかもしれない、だがMinecraft自身はけっしてnameにスペースを含めタグを保存することはない。最終的にタグのタイプによりタグのペイロードバイトが続く。このテーブルはNBTFormat19133バージョンにおける12のタグの説明である。

ID アイコン タグの種類 ペイロード 説明 ストレージ容量
0 TAG_End なし 終了するのに使用する。このタグに名前はない、だから1バイト(0)のみである。空のリストのタグになることもある。 N/A
1 TAG_Byte 1バイト/8ビット符号付き 符号付整数型 しばしば真偽値を表すのにも使用される 範囲 -(27)から(27 - 1)
(-128から127)
2 TAG_Short 2バイト/16ビット符号付きビッグエンディアン 符号付整数型 範囲 -(215)から(215 - 1)
(-32,768から32,767)
3 TAG_Int 4バイト/32ビット符号付きビッグエンディアン 符号付整数型 範囲 -(231)から(231 - 1)
(-2,147,483,648から2,147,483,647)
4 TAG_Long 8バイト/64ビット符号付きビッグエンディアン 符号付整数型. 範囲 -(263)から(263 - 1)
(-9,223,372,036,854,775,808から9,223,372,036,854,775,807)
5 TAG_Float 4バイト/32ビット符号付きビッグエンディアン, IEEE 754-2008, バイナリ32 符号付浮動小数点数. 精度は数字の行全体で異なる:
Single-precision floating-point format参照。最大値3.4*1038
6 TAG_Double 8バイト/64ビット符号付きビッグエンディアンIEEE 754-2008, バイナリ64 符号付浮動小数点数 精度は数字の行全体で異なる:
Double-precision floating-point format参照。最大値 1.8*10308
7 TAG_Byte_Array TAG_Intで要素数 それから要素数分のTAG_Byteのペイロード. バイト配列 最大要素数 (231 - 9) and (231 - 1) (2,147,483,639 and 2,147,483,647) JVMによる
8 TAG_String TAG_Shortのペイロードでバイト数 それからUTF-8文字列のバイト. UTF-8でエンコードされた文字列。

サイズがあり、nullで終わることはない。

最大で32767バイト 詳しくはUTF-8フォーマットを参照
9 TAG_List TAG_ByteのペイロードでTagタイプを決め、続いてTAG_Intのペイロードで要素数を決める。それから指定したタグIDのペイロードが続く。 タグペイロードのリスト、なおTagIDは省略され名前も無い。 最大要素数は231-9個 または20億4748万3639個である。

(JVMの上限やjava.util.ArrayListの実装による) (リストは512回以上入れ子にできない)

10 TAG_Compound フリーフォーマットである。終端にTAG_Endを指定する。 フリーフォーマット JVMのメモリによるが、リストと違い、要素(タグ)の数に上限はない。(512回以上入れ子にはできない)
11 TAG_Int_Array TAG_Intのペイロードで要素数、それからTAG_Intのペイロードが要素数分続く。 4バイト整数配列 特定のJVMに応じ、エレメントの最大数の範囲は(231 - 9)から(231 - 1) (2,147,483,639から2,147,483,647)

ListおよびComponentタグは、再帰的にネストできる。また、リストのリストでは、サブリストのそれぞれが異なる種類のタグをリストできる事に注意。 注意:要素数や文字数を示す型は符号付きである。

Fileフォーマット

NBTファイルは、GZipされた複合タグであり、名前とタグIDが含まれている。 Minecraftで使用されるファイルの一部は圧縮されていない場合があるが、ほとんどの場合、ファイルはNotchの元の仕様に従っており、GZipで圧縮されている。Xbox 360 Editionでは、LZX圧縮アルゴリズムのバリエーションであるXMemCompressでチャンクが圧縮される。バージョンやその他の情報を指定するヘッダーはない。level.datファイルのみがバージョンを指定する。

Minecraftで使用されるもの

MinecraftのNBT形式の使用は時々奇妙である。場合によっては、空のリストは、正しい種類のリストではなく、バイトタグのリストとして、または新しいバージョンのMinecraftの終了タグのリストとして表されることがある。さらに、ほとんどすべてのルートタグには空の名前文字列があり、実際のデータと名前を持つ1つの複合タグのみをカプセル化する。 例えば:

  • ほとんどのMinecraft NBT構造のルートタグ。
    •  SomeName: ルートタグ内に含まれる唯一のタグ - 名前があり、すべての実際のデータが含まれる。

もう1つの注目すべき奇妙な点は、Notchによる元の仕様ではタグ名にスペースを使用できるが、例でもタグ名にスペースを使用しているにもかかわらず、Minecraftにはタグに名前にスペースが含まれる既知のファイルがないということである。また、大部分がlowerCamelCaseまたはUpperCamelCaseのいずれかであるが、場合によってはすべて小文字でもよいなど、大文字小文字の使用に一貫性がない。

使用

  • level.datは圧縮されたNBT形式で保存される
  • <player>.datファイルは圧縮されたNBT形式で保存される
  • idcounts.datは非圧縮NBT形式で保存される
  • villages.datは圧縮されたNBT形式で保存される
  • map_<#>.datファイルは圧縮されたNBT形式で保存される
  • servers.datは保存されたマルチプレイヤーサーバーのリストを非圧縮NBTとして保存するのに使用される
  • ChunksはRegionファイル内に圧縮されたNBT形式で保存される
  • scoreboard.datは圧縮されたNBT形式で保存される
  • Generated structuresは圧縮されたNBT形式で保存される

ソフトウェア

Mojangは、開発者がMcRegion -> Anvil converterコンバーターのソースコードの一部として使用および参照するためのサンプルJava NBTクラスを提供している。これ以外に、コミュニティは圧縮および非圧縮のNBTファイルを表示および変更するプログラムを開発した。

名前 NBTバージョン 説明 スクリーンショット
MineBack Ultimate 19133 MineBack Ultimateは、利用可能なすべてのタイプのNBT形式ファイル(マップ、レベル、ワールドなど)をサポートする完全なNBTエディターを提供する。最新のGUIと多くのヘルパー機能が付属している。 MineBackNBTEditor
NBTEdit 19132 Windowsツリーコントロールを介してNBTファイルを表示および変更できる。 NBTバージョンが遅れているだけでなく、同じ名前の複数のタグをサポートせず、一部の種類で誤った範囲を強制し、非圧縮のNBTファイルをサポートしていないため、時代遅れである。 NBTEdit Level.Dat
NBTExplorer - Forum Post 19133 このプログラムは、NBTEditに触発され、それに基づいており、Windowsツリーコントロールを介してNBTファイルを表示および編集できる。圧縮および非圧縮のNBTファイルをサポートし、MCRegionおよびAnvilファイル、level.datなどのNBT構造を直接編集できる。 NBTExplorer
NBT grammar for Synalyze It! 19132 これを使用すると、解析されたタグツリーとともに色分けされた16進ダンプが表示される。現在、非圧縮ファイルのみがサポートされている。 Synalyze-It-NBT-decoded
NEINedit 19132 テキストベースのツリー構造を備えたMac用のNBTエディター。 NEINedit
NBT2YAML 19133 nbt2yamlは、カスタムYAML形式を使用してMinecraft NBTファイルを読み取りおよび編集するためのコマンドラインインターフェイスを提供しする。 また、単純なPythonデータ構造との間でNBTファイルを解析および書き込むためのPython APIも含まれている。
webNBT 19133 webNBTは、ユーザーがアプリケーションをダウンロードしたり、サードパーティのブラウザープラグイン(FlashやJavaなど)を使用したりすることなく、最新のブラウザーで実行されるNBTエディターである