Minecraft Blogs / Tutorial

Minecraft Info Part 2 - NBT Format

  • 1,415 views, 4 today
  • 4
  • 1
  • 1
QuickWhitt7's Avatar QuickWhitt7
Level 34 : Artisan Creeper Hugger
13
Greetings users. In this tutorial, I will show you the basics of the NBT format, how it is used in Minecraft and software that you can use to edit NBT files.

What is NBT?


NBT stands for Named Binary Tag - it is essentially a format used to store data in a tree structure made up of 13 tags (12 are used, one is empty), all of which have an ID and a name. It was first introduced with Java Edition Beta 1.3 as version 19132, and is currently at version 19133.

NBT files are GZip'd Compound tags, name and tag ID included.

The Tags


Tag TypeWhat It Is/Does
TAG_EndMarks the end of compound tags
TAG_ByteDefines a byte (values ranging from -128 to 127). Useful for saving memory in large arrays. Sometimes used in the game for boolean values.
TAG_ShortA signed integral type, in this case a short, with values raning from -32,768 to 32,767.
TAG_IntA signed integral type, in this case a int, with values ranging from -231 to 231-1. "Int", by the way, stands for integer.
TAG_LongA signed integral type, int his a long, with values raning from -263 to 263-1.
TAG_FloatA decimal value, usually with no limit on the amount of decimal numbers.
TAG_DoubleA decimal value. usually limited to a certain amount of decimal numbers.
TAG_Byte_ArrayAn array of bytes.
TAG_StringA UTF-8 string, or line of text.
TAG_ListA list of tags, without repeated tag IDs or any tag names.
TAG_CompoundA list of fully formed tags, including their IDs, names, and other values.
TAG_Int_ArrayAn array of TAG_Int's.
TAG_Long_ArrayAn array of TAG_Long's.


Uses


It is used in a lot of files in the .minecraft directory, usually with either the .dat or .nbt format. The level file for each world, level.dat, is formatted in NBT. So is the server list, servers.dat.

Programs


There are a variety of different programs you can use to edit NBT files. The most popular one, and one I would suggest, is NBTExplorer. WebNBT is also a good editor - you can just drag and drop an NBT file and edit it from there.

Thanks for reading. Leave a comment, give a diamond, and let me know what tutorial I should do next.
CreditMinecraft Wiki, Oracle Docs
Tags

Create an account or sign in to comment.

1
06/06/2021 4:31 pm
Level 63 : High Grandmaster Lego Builder
corv1njano
corv1njano's Avatar
Yo, really nice! Is there any way to open a .dat file without any other program? Just encode it into plain text, you know?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome