Minecraft Wiki
No edit summary
m (Grammar error)
Tag: Visual edit
(35 intermediate revisions by 18 users not shown)
Line 1: Line 1:
The '''Named Binary Tag''' ('''NBT''') format is use by ''Minecraft'' for the various files in which it saves data. The format is designed to store data in a tree structure made up of various ''tags''. All tags have an ID and a name.
+
The '''Named Binary Tag''' ('''NBT''') format is a [[wikipedia:Tree (data structure)|tree data structure]] used by ''Minecraft'' in many [[Java Edition level format|save files]] to store arbitrary data. The format is comprised of a handful of ''tags''. Tags have a numeric ID, a name, and a [[Wikipedia:payload (computing)|payload]]. A user-accessible version in the form of [[Wikipedia:string (computer science)|strings]] is the '''stringified Named Binary Tag''' ('''SNBT''') format.
 
Another more user-friendly format of NBT is in plain string, as used in [[command]]s. This format is referred to as '''SNBT''', short for '''stringified NBT'''.
 
   
 
== SNBT format ==
 
== SNBT format ==
 
{{exclusive|java|section=1}}
 
{{exclusive|java|section=1}}
'''SNBT''', also known as '''data tag''', is often used in command {{in|java}}. It can be described starting with [[wikipedia:attribute-value pair|attribute-value pair]]s enclosed in curly braces. One common usage of data tags {{in|je}} is in commands, used to specify complex data for any entity.
+
SNBT, also known as '''data tag''', is often used in command {{in|java}}. It can be described starting with [[wikipedia:Name–value pair|key-value pairs]] enclosed in curly braces. One common usage of data tags {{in|je}} is in commands, used to specify complex data for any entity.
   
 
A data tag consists of zero or more attribute-value pairs delimited by commas and enclosed in curly braces. Each attribute-value pair consists of an tag name and the tag's value, separated by a colon. Some values, however, may be a compound tag and themselves contain attribute-value pairs, allowing a data tag to describe a hierarchical data structure.
 
A data tag consists of zero or more attribute-value pairs delimited by commas and enclosed in curly braces. Each attribute-value pair consists of an tag name and the tag's value, separated by a colon. Some values, however, may be a compound tag and themselves contain attribute-value pairs, allowing a data tag to describe a hierarchical data structure.
  +
 
:''Example:'' <code><nowiki>{name1:123,name2:"sometext1",name3:{subname1:456,subname2:"sometext2"}}</nowiki></code>
   
 
Tag's name can be enclosed with double quotes if necessary.
 
Tag's name can be enclosed with double quotes if necessary.
   
 
It is different from the [[JSON]] format; hence, any JSON used in NBT, such as [[Commands#Raw JSON text|raw JSON text]], must be enclosed within a {{nbt|string}} string tag.
 
It is different from the [[JSON]] format; hence, any JSON used in NBT, such as [[Commands#Raw JSON text|raw JSON text]], must be enclosed within a {{nbt|string}} string tag.
 
:''Example:'' <code>{name1:123,name2:"sometext",name3:{subname1:456,subname2:789}}</code>
 
   
 
=== Format of each type===
 
=== Format of each type===
Line 23: Line 21:
 
! Type
 
! Type
 
! Description
 
! Description
  +
! Format
  +
! Example
 
|-
 
|-
 
| {{nbt|byte|Byte}}
 
| {{nbt|byte|Byte}}
 
| A signed 8-bit integer, ranging from -128 to 127 (inclusive).
 
| A signed 8-bit integer, ranging from -128 to 127 (inclusive).
:''Example:'' <code>34b</code>
+
| <code><number>b</code> or <code><number>B</code>
 
| <code>34B</code>, <code>-20b</code>
   
 
|-
 
|-
 
| {{nbt|short|Short}}
 
| {{nbt|short|Short}}
 
| A signed 16-bit integer, ranging from -32,768 to 32,767 (inclusive).
 
| A signed 16-bit integer, ranging from -32,768 to 32,767 (inclusive).
:''Example:''<code>31415s</code>
+
| <code><number>s</code> or <code><number>S</code>
 
| <code>31415s</code>, <code>-27183s</code>
   
 
|-
 
|-
 
| {{nbt|int|Int}}
 
| {{nbt|int|Int}}
 
| A signed 32-bit integer, ranging from -2,147,483,648 and 2,147,483,647 (inclusive).
 
| A signed 32-bit integer, ranging from -2,147,483,648 and 2,147,483,647 (inclusive).
:''Example:'' <code>31415926</code>
+
| <code><integer_number></code>
 
| <code>31415926</code>
 
|-
 
|-
 
| {{nbt|long|Long}}
 
| {{nbt|long|Long}}
 
| A signed 64-bit integer, ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (inclusive).
 
| A signed 64-bit integer, ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (inclusive).
:''Example:'' <code>31415926l</code>
+
| <code><number>l</code> or <code><number>L</code>
 
| <code>31415926l</code>
 
 
|-
 
|-
 
| {{nbt|float|Float}}
 
| {{nbt|float|Float}}
 
| A 32-bit, single-precision floating-point number, ranging from -3.4E+38 to +3.4E+38.
 
| A 32-bit, single-precision floating-point number, ranging from -3.4E+38 to +3.4E+38.
:''Example:'' <code>3.1415926f</code>
 
   
 
See [[wikipedia:IEEE floating point|IEEE floating point]] for details.
 
See [[wikipedia:IEEE floating point|IEEE floating point]] for details.
 
| <code><number>f</code> or <code><number>F</code>
 
| <code>3.1415926f</code>
 
|-
 
|-
 
| {{nbt|double|Double}}
 
| {{nbt|double|Double}}
 
| A 64-bit, double-precision floating-point, ranging from -1.7E+308 to +1.7E+308.
 
| A 64-bit, double-precision floating-point, ranging from -1.7E+308 to +1.7E+308.
:''Example:'' <code>3.1415926</code>
 
   
 
See [[wikipedia:IEEE floating point|IEEE floating point]] for details.
 
See [[wikipedia:IEEE floating point|IEEE floating point]] for details.
 
| <code><decimal_number></code>, <code><number>d</code> or <code><number>D</code>
 
| <code>3.1415926</code>
 
|-
 
|-
 
| {{nbt|string|String}}
 
| {{nbt|string|String}}
 
| A sequence of characters, enclosed in quotes. For strings without commas, brackets, braces or spaces, quote enclosure is optional. Quotes can be either single quote <code>'</code> or double <code>"</code>. Nested quotes can be included within a string by escaping the character with a <code>\</code> escape.
 
| A sequence of characters, enclosed in quotes. For strings without commas, brackets, braces or spaces, quote enclosure is optional. Quotes can be either single quote <code>'</code> or double <code>"</code>. Nested quotes can be included within a string by escaping the character with a <code>\</code> escape.
 
| <code><a-zA-Z0-9 text></code>, <code>"<text>"</code> ({{cd|"}} within needs to be escaped to {{cd|\"}}), or <code>'<text>'</code> ({{cd|'}} within needs to be escaped to {{cd|\'}})
  +
|
 
<code><nowiki>"Call me \"Ishmael\""</nowiki></code>
   
 
<code><nowiki>'Call me "Ishmael"'</nowiki></code>
:''Examples:''
 
  +
:* <code><nowiki>"Call me \"Ishmael\""</nowiki></code>
 
:* <code><nowiki>'Call me "Ishmael"'</nowiki></code>
+
<code><nowiki>'Call me \'Ishmael\''</nowiki></code>
  +
:* <code><nowiki>'Call me \'Ishmael\''</nowiki></code>
 
:* <code><nowiki>"Call me 'Ishmael'"</nowiki></code>
+
<code><nowiki>"Call me 'Ishmael'"</nowiki></code>
 
|-
 
|-
 
| {{nbt|list|List}}
 
| {{nbt|list|List}}
 
| An ordered list of tags, enclosed in square brackets and delimited by commas. The tags must be of the same type, determined by the first tag in the list.
 
| An ordered list of tags, enclosed in square brackets and delimited by commas. The tags must be of the same type, determined by the first tag in the list.
 
| <code>[<value>,<value>,...]</code>
 
:''Example:'' <code>[3.2,64.5,129.5]</code>
+
| <code>[3.2,64.5,129.5]</code>
 
|-
 
|-
 
| style="white-space:nowrap" | {{nbt|compound|Compound}}
 
| style="white-space:nowrap" | {{nbt|compound|Compound}}
 
| An ordered list of attribute-value pairs, enclosed in curly braces and delimited by commas.
 
| An ordered list of attribute-value pairs, enclosed in curly braces and delimited by commas.
   
 
Each tag can be of any type.
:''Example:'' <code>{X:3,Y:64,Z:129}</code>
 
 
| <code>{<tag name>:<value>,<tag name>:<value>,...}</code>
 
| <code>{X:3,Y:64,Z:129}</code>
   
Each tag may be of any type.
 
 
|-
 
|-
 
| {{nbt|byte-array|Byte Array}}
 
| {{nbt|byte-array|Byte Array}}
 
| <code>B;</code> followed by an ordered list of 8-bit integers, delimited by commas. Tag is enclosed in square brackets.
 
| <code>B;</code> followed by an ordered list of 8-bit integers, delimited by commas. Tag is enclosed in square brackets.
:''Example:'' <code>[B;1b,2b,3b]</code>
+
| <code>[B;<byte>b,<byte>B,...]</code>
 
| <code>[B;1b,2b,3b]</code>
 
|-
 
|-
 
| {{nbt|int-array|Int Array}}
 
| {{nbt|int-array|Int Array}}
 
| <code>I;</code> followed by an ordered list of 32-bit integers, delimited by commas. Tag is enclosed in square brackets.
 
| <code>I;</code> followed by an ordered list of 32-bit integers, delimited by commas. Tag is enclosed in square brackets.
 
| <code>[I;<integer>,<integer>,...]</code>
 
:''Example:'' <code>[I;1,2,3]</code>
+
| <code>[I;1,2,3]</code>
 
|-
 
|-
 
| {{nbt|long-array|Long Array}}
 
| {{nbt|long-array|Long Array}}
 
| <code>L;</code> followed by an ordered list of 64-bit integers, delimited by commas. Tag is enclosed in square brackets.
 
| <code>L;</code> followed by an ordered list of 64-bit integers, delimited by commas. Tag is enclosed in square brackets.
  +
| <code>[L;<long>l,<long>L,...]</code>
 
:''Example:'' <code>[L;1l,2l,3l]</code>
+
| <code>[L;1l,2l,3l]</code>
 
|-
 
|-
 
| {{nbt|boolean|Boolean}}
 
| {{nbt|boolean|Boolean}}
| A value, expressed as "true", "false", or "1", "0". This is resolved by the game into a {{nbt|byte|Byte}} tag as 0 (for false) and 1 (for true).
+
| A value, expressed as <code>true</code>, <code>false</code>. It is resolved by the game into a {{nbt|byte|Byte}} tag as 0b (for false) and 1b (for true).
 
| <code>true</code>, <code>false</code> or <code>0b</code>, <code>1b</code>
 
| <code>{doFoo:true}</code>
  +
|-
  +
|}
   
  +
== NBT object ==
:''Example:'' <code>{doFoo:true}</code>
 
  +
When the game is running, entities and block entities in loading chunks are stored in the memory. They are not stored with NBT, instead, they are just programmatic objects.
  +
  +
When processing NBT operations, the game needs to generate programmatic NBT object from entities/block entities, parse SNBT into NBT object, modify entities/blocks based on provided NBT object, or convert NBT object into SNBT.
  +
  +
=== Generating NBT object ===
  +
  +
When generating NBT from an entity/block, the entity/block's properties are added into programmatic NBT object.
  +
  +
Note that not all properties are added. For example, the value of whether a player is opening a chest won't be added into NBT object.
  +
  +
A value is added with certain data type. For example, a resource location will be [[Resource location#Conversion to string|converted to a string value]].
  +
  +
These NBT objects will also be stored into game's save files as NBT files when the game quits or automatically saves. So the data structures that NBT tags describe and the data type for each tag are basically the same ones used in game's save files. These data structures are described in other articles and commands expect data tags to use the same attribute names (which are case-sensitive):
  +
  +
{| class="wikitable"
  +
|+ Data Structure Specification Links
  +
! Objects
 
! Examples
 
|-
 
|-
  +
| [[Chunk format#Block entity format|Block entities]]
  +
| chests, furnaces, command blocks, mob spawners, signs, etc.
  +
|-
  +
| [[Player.dat#Item structure|Items]]
  +
| items in inventories (includes specifications for enchantments, lore, custom names, etc.)
  +
|-
  +
| [[Entity format#Items and XPOrbs|Item entities]]
  +
| items on the ground
  +
|-
  +
| [[Entity format#Mobs|Mobs]]
  +
| creepers, cows, villagers, etc.
  +
|-
  +
| [[Entity format#Projectiles|Projectiles]]
  +
| arrows, fireballs, thrown potions, etc.
  +
|-
  +
| [[Entity format#Vehicles|Vehicles]]
  +
| boats, minecarts, etc.
  +
|-
  +
| [[Entity format#Dynamic Tiles|Dynamic tiles]]
  +
|primed TNT, falling sand/gravel/concrete powder/anvils
  +
|-
  +
| [[Entity format#Other|Other entities]]
  +
| firework rockets, paintings, and item frames
 
|}
 
|}
   
  +
===Conversion to SNBT===
Some commands may require that a number's type be specified by adding a letter (B, S, L, F, D) to the end of the value. For example, <code>3s</code> for a short, <code>3.2f</code> for a float, etc. (This doesn't work with I for int.) The letter can be uppercase or lowercase. When no letter is used and ''Minecraft'' can't tell the type from context, it assumes double if there's a decimal point, int if there's no decimal point and the size fits within 32 bits, or string if neither is true. A square-bracketed literal is assumed to be a list unless an identifier is used: <code>[I;1,2,3]</code> for an int array and <code>[L;1L,2L,3L]</code> for a long array.
 
  +
{{exclusive|java|section=1}}
  +
A programmatic NBT object would be converted to a SNBT when trying to get it with {{cmd|data get}} etc.
  +
  +
After converted, a number is always followed by a letter (lowercase for b, s, f, d, and uppercase for L) except {{nbt|integer|Integer}}. For example, <code>3s</code> for a short, <code>3.2f</code> for a float, etc.
  +
  +
And a string is always enclosed by double or single quotes.
  +
  +
Other data types are expressed as the [[#Format of each type]] table above.
  +
  +
===Conversion from SNBT===
  +
{{exclusive|java|section=1}}
  +
An SNBT will be converted to a programmatic NBT object when parsed by the game.
  +
 
A number that followed by a letter (B, S, L, F, D, or their lowercase) is resolved to corresponding data type. For example, <code>3s</code> for a short, <code>3.2f</code> for a float, etc. The letter can be uppercase or lowercase. When no letter is used, it assumes double if there's a decimal point, int if there's no decimal point and the size fits within 32 bits, or '''string''' if neither is true.
  +
  +
A square-bracketed literal is assumed to be a list unless an identifier is used: <code>[I;1,2,3]</code> for an int array and <code>[L;1L,2L,3L]</code> for a long array.
  +
  +
<code>true</code> and <code>false</code> are converted as <code>1b</code> and <code>0b</code> respectively.
  +
  +
===Modifying entity/block based on NBT object===
  +
{{exclusive|java|section=1}}
  +
Modifying entity/block based on a programmatic NBT object is not a simple progress. All certain tags need to be resolved before changing properties of a block/entity. Note that only certain properties can be changed. For example, when using {{cmd|data}} command to modify a block entity, its coordinates cannot be changed.
  +
  +
If a property needs a value of resource location and gets a {{nbt|string|string}} tag, the string will be [[Resource location#Conversion from string|converted to a resource location]].
  +
  +
If a property needs a value of JSON text and gets a {{nbt|string|string}} tag, the string will be parsed into JSON text object.
  +
  +
If a property needs a numeric value of certain type and gets a numeric tag of wrong type, the number will get some rounding operation and converts to the required type.
  +
  +
If a property needs a numeric value and gets a non-numeric tag, the number will become 0.
  +
  +
If a property needs a string value and gets a non-string tag, the string will become an empty string.
  +
  +
If a property needs a list or array of certain type and gets a wrong-type tag, a empty list/array will be got.
  +
  +
If a property needs a compound tag and gets a non-compound tag, a empty compound tag will be got.
  +
  +
===Testing NBT tags===
  +
{{exclusive|java|section=1}}
  +
When commands such as {{cmd|clear}}, {{cmd|execute if data}} are used to match data tags, or [[target selectors#Selecting targets by NBT data‌|nbt argument in target selector]] tries to target entity, the game converts SNBT into programmatic NBT object and gets programmatic NBT object from block/entity/storage, then compares the two NBT objects.
  +
 
They check only for the presence of the provided tags in the target entity/block/storage. This means that the entity/block/storage can have additional tags and still match. This is true even for lists: the order and number of elements in a list are not considered, and as long as every requested element is in the list, it matches even if there are additional elements. For example, an entity with data <code>{Pos:[1d,2d,3d],Tags:["a","b"]}</code> can be targeted by <code>@e[nbt={Pos:[3d,2d,1d]}]</code> or even just <code>@e[nbt={Pos:[2d]}]</code> even though the former represents a totally different position and the latter is not a valid position at all. Note that <code>@e[nbt={Tags:[]}]</code> can't match it, because an empty list can only match empty list.
  +
  +
However, the order and number of elements in an byte/long/int array '''is''' acknowledged.
  +
  +
The requested data tags in the target entity/block/storage must match ''exactly'' for the provided tags to pass, including the data type (e.g. <code>1</code>, an int, will not match <code>1d</code>, a double). Namespaces also can't omitted because in NBT object it is just a plain string that won't be resolved into a resource location (e.g. <code><nowiki>@e[nbt={Item:{id:"stone"}}]</nowiki></code> will not match a stone item entity, it must be <code><nowiki>@e[nbt={Item:{id:"minecraft:stone"}}]</nowiki></code>). The same is true for string of JSON text, which must be exactly the same to match the provided tag (e.g. <code><nowiki>@e[nbt={CustomName:'"a"'}]</nowiki></code> will not match any entity, it must be <code><nowiki>@e[nbt={CustomName:"{\"text\":\"a\"}"}]</nowiki></code> or <code><nowiki>@e[nbt={CustomName:'{"text":"a"}'}]</nowiki></code>).
   
  +
{{Anchor|NBT file}}
When commands such as {{cmd|clear}} are used to match data tags, they check only for the presence of the provided tags in the target entity/block/item. This means that the entity/block/item can have additional tags and still match. This is true even for lists: the order of a list is not considered, and as long as every requested element is in the list, it matches even if there are additional elements. However, the order and number of elements in a array is acknowledged.
 
   
== NBT file ==
+
== Binary format ==
   
 
An NBT file is a zipped Compound tag, with the name and tag ID included. The file in the zip must contain the Compound tag that it is as the first bytes. 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.
 
An NBT file is a zipped Compound tag, with the name and tag ID included. The file in the zip must contain the Compound tag that it is as the first bytes. 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.
   
 
=== TAG definition ===
 
=== TAG definition ===
A tag is an individual part of the data tree. The first byte in a tag is the tag type (ID), followed by a two byte big-endian unsigned integer for the length of the name, then the name as a string in UTF-8 format (Note TAG_'''End''' is not named and does not contain the extra 2 bytes; the name is assumed to be empty). Finally, depending on the type of the tag, the bytes that follow are part of that tag's ''payload''. This table describes each of the 13 known tags in version 19133 of the NBT format:
+
A tag is an individual part of the data tree. The first byte in a tag is the tag type (ID), followed by a two byte big-endian unsigned integer for the length of the name, then the name as a string in UTF-8 format (Note TAG_End is not named and does not contain the extra 2 bytes; the name is assumed to be empty). Finally, depending on the type of the tag, the bytes that follow are part of that tag's ''payload''. This table describes each of the 13 known tags in version 19133 of the NBT format:
 
{| class="wikitable" data-description="NBT tags"
 
{| class="wikitable" data-description="NBT tags"
 
|-
 
|-
Line 113: Line 214:
 
! Tag Type
 
! Tag Type
 
! Payload
 
! Payload
! SNBT Format{{only|java|short=y}}
 
 
! Description
 
! Description
 
! width="33%" align="center" | Storage Capacity
 
! width="33%" align="center" | Storage Capacity
Line 120: Line 220:
 
|
 
|
 
| TAG_'''End'''
 
| TAG_'''End'''
| None.
 
 
| -
 
| -
 
| Used to mark the end of compound tags. This tag '''does not have a name''', so it is only ever a single byte 0. It may also be the type of empty List tags.
 
| Used to mark the end of compound tags. This tag '''does not have a name''', so it is only ever a single byte 0. It may also be the type of empty List tags.
Line 129: Line 228:
 
| TAG_'''Byte'''
 
| TAG_'''Byte'''
 
| 1 byte / 8 bits, signed
 
| 1 byte / 8 bits, signed
| <code><number>b</code> or <code><number>B</code>
 
 
| A signed integral type. Sometimes used for booleans.
 
| A signed integral type. Sometimes used for booleans.
 
| Full range of -(2<sup>7</sup>) to (2<sup>7</sup> - 1)<br>(-128 to 127)
 
| Full range of -(2<sup>7</sup>) to (2<sup>7</sup> - 1)<br>(-128 to 127)
Line 137: Line 235:
 
| TAG_'''Short'''
 
| TAG_'''Short'''
 
| 2 bytes / 16 bits, signed, big endian
 
| 2 bytes / 16 bits, signed, big endian
| <code><number>s</code> or <code><number>S</code>
 
 
| A signed integral type.
 
| A signed integral type.
 
| Full range of -(2<sup>15</sup>) to (2<sup>15</sup> - 1)<br>(-32,768 to 32,767)
 
| Full range of -(2<sup>15</sup>) to (2<sup>15</sup> - 1)<br>(-32,768 to 32,767)
Line 145: Line 242:
 
| TAG_'''Int'''
 
| TAG_'''Int'''
 
| 4 bytes / 32 bits, signed, big endian
 
| 4 bytes / 32 bits, signed, big endian
| <code><number></code>
 
 
| A signed integral type.
 
| A signed integral type.
 
| Full range of -(2<sup>31</sup>) to (2<sup>31</sup> - 1)<br>(-2,147,483,648 to 2,147,483,647)
 
| Full range of -(2<sup>31</sup>) to (2<sup>31</sup> - 1)<br>(-2,147,483,648 to 2,147,483,647)
Line 153: Line 249:
 
| TAG_'''Long'''
 
| TAG_'''Long'''
 
| 8 bytes / 64 bits, signed, big endian
 
| 8 bytes / 64 bits, signed, big endian
| <code><number>l</code> or <code><number>L</code>
 
 
| A signed integral type.
 
| A signed integral type.
 
| Full range of -(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)
 
| Full range of -(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)
Line 161: Line 256:
 
| TAG_'''Float'''
 
| TAG_'''Float'''
 
| 4 bytes / 32 bits, signed, big endian, IEEE 754-2008, binary32
 
| 4 bytes / 32 bits, signed, big endian, IEEE 754-2008, binary32
| <code><number>f</code> or <code><number>F</code>
 
 
| A signed floating point type.
 
| A signed floating point type.
 
| Precision varies throughout number line;<br>See [[wikipedia:Single-precision floating-point format|Single-precision floating-point format]]. Maximum value about 3.4*10<sup>38</sup>
 
| Precision varies throughout number line;<br>See [[wikipedia:Single-precision floating-point format|Single-precision floating-point format]]. Maximum value about 3.4*10<sup>38</sup>
Line 169: Line 263:
 
| TAG_'''Double'''
 
| TAG_'''Double'''
 
| 8 bytes / 64 bits, signed, big endian, IEEE 754-2008, binary64
 
| 8 bytes / 64 bits, signed, big endian, IEEE 754-2008, binary64
| <code><decimal number></code>, <code><number>d</code> or <code><number>D</code>
 
 
| A signed floating point type.
 
| A signed floating point type.
 
| Precision varies throughout number line;<br>See [[wikipedia:Double-precision floating-point format|Double-precision floating-point format]]. Maximum value about 1.8*10<sup>308</sup>
 
| Precision varies throughout number line;<br>See [[wikipedia:Double-precision floating-point format|Double-precision floating-point format]]. Maximum value about 1.8*10<sup>308</sup>
Line 177: Line 270:
 
| TAG_'''Byte'''_'''Array'''
 
| TAG_'''Byte'''_'''Array'''
 
| TAG_Int's payload ''size'', then ''size'' TAG_Byte's payloads.
 
| TAG_Int's payload ''size'', then ''size'' TAG_Byte's payloads.
| <code>[B;<byte>,<byte>,...]</code>
 
 
| An array of bytes.
 
| An array of bytes.
 
| 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.
 
| 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.
Line 185: Line 277:
 
| TAG_'''String'''
 
| TAG_'''String'''
 
| A TAG_Short-like, but instead unsigned<ref>https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html#writeUTF-java.lang.String-</ref> payload ''length'', then a UTF-8 string resembled by ''length'' bytes.
 
| A TAG_Short-like, but instead unsigned<ref>https://docs.oracle.com/javase/8/docs/api/java/io/DataOutput.html#writeUTF-java.lang.String-</ref> payload ''length'', then a UTF-8 string resembled by ''length'' bytes.
| <code><a-zA-Z0-9 text></code>, <code>"<text>"</code> ({{cd|"}} within needs to be escaped to {{cd|\"}}), or <code>'<text>'</code> ({{cd|'}} within needs to be escaped to {{cd|\'}})
 
 
| A UTF-8 string. It has a size, rather than being null terminated.
 
| A UTF-8 string. It has a size, rather than being null terminated.
 
| 65,535 bytes interpretable as UTF-8 (see [[wikipedia:UTF-8#Modified_UTF-8|modified UTF-8 format]]; most commonly-used characters are a single byte).
 
| 65,535 bytes interpretable as UTF-8 (see [[wikipedia:UTF-8#Modified_UTF-8|modified UTF-8 format]]; most commonly-used characters are a single byte).
Line 193: Line 284:
 
| TAG_'''List'''
 
| TAG_'''List'''
 
| TAG_Byte's payload ''tagId'', then TAG_Int's payload ''size'', then ''size'' tags' payloads, all of type ''tagId''.
 
| TAG_Byte's payload ''tagId'', then TAG_Int's payload ''size'', then ''size'' tags' payloads, all of type ''tagId''.
| <code>[<value>,<value>,...]</code>
 
 
| A list of tag payloads, without repeated tag IDs or any tag names.
 
| A list of tag payloads, without repeated tag IDs or any tag names.
 
| Due to JVM limitations and the implementation of ArrayList, the maximum number of list elements is (2<sup>31</sup> - 9), or 2,147,483,639. Also note that List and Compound tags may not be nested beyond a depth of 512.
 
| Due to JVM limitations and the implementation of ArrayList, the maximum number of list elements is (2<sup>31</sup> - 9), or 2,147,483,639. Also note that List and Compound tags may not be nested beyond a depth of 512.
Line 201: Line 291:
 
| TAG_'''Compound'''
 
| TAG_'''Compound'''
 
| Fully formed tags, followed by a TAG_End.
 
| Fully formed tags, followed by a TAG_End.
| <code>{<tag name>:<value>,<tag name>:<value>,...}</code>
 
 
| A list of fully formed tags, including their IDs, names, and payloads. No two tags may have the same name.
 
| A list of fully formed tags, including their IDs, names, and payloads. No two tags may have the same name.
 
| Unlike lists, there is no hard limit to the number of tags within a Compound (of course, there is always the implicit limit of virtual memory). Note, however, that Compound and List tags may not be nested beyond a depth of 512.
 
| Unlike lists, there is no hard limit to the number of tags within a Compound (of course, there is always the implicit limit of virtual memory). Note, however, that Compound and List tags may not be nested beyond a depth of 512.
Line 209: Line 298:
 
| TAG_'''Int'''_'''Array'''
 
| TAG_'''Int'''_'''Array'''
 
| TAG_Int's payload ''size'', then ''size'' TAG_Int's payloads.
 
| TAG_Int's payload ''size'', then ''size'' TAG_Int's payloads.
| <code>[I;<integer>,<integer>,...]</code>
 
 
| An array of TAG_Int's payloads.
 
| An array of TAG_Int's payloads.
 
| 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.
 
| 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.
Line 217: Line 305:
 
| TAG_'''Long'''_'''Array'''
 
| TAG_'''Long'''_'''Array'''
 
| TAG_Int's payload ''size'', then ''size'' TAG_Long's payloads.
 
| TAG_Int's payload ''size'', then ''size'' TAG_Long's payloads.
| <code>[L;<long>,<long>,...]</code>
 
 
| An array of TAG_Long's payloads.
 
| An array of TAG_Long's payloads.
 
| 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.
 
| 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.
Line 229: Line 316:
 
** {{nbt|compound|SomeName}}: The only tag contained within the root tag - it has a name and contains all the actual data.
 
** {{nbt|compound|SomeName}}: The only tag contained within the root tag - it has a name and contains all the actual data.
 
</div>
 
</div>
Additionally, 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 camelCase or PascalCase, but sometimes even in all lowercase.
+
Additionally, there is also inconsistent use of letter case, mostly either camelCase or PascalCase, but sometimes even in all lowercase.
   
 
==== Uses ====
 
==== Uses ====
 
{{missing information|section|Bedrock Edition NBTs|type=code}}
 
{{missing information|section|Bedrock Edition NBTs|type=code}}
* <samp>[[level.dat]]</samp> is stored in compressed NBT format.
+
*<samp>[[level.dat]]</samp> is stored in compressed NBT format.
* <samp>[[Player.dat format|<''player''>.dat]]</samp> files are stored in compressed NBT format.
+
*<samp>[[Player.dat format|<''player''>.dat]]</samp> files are stored in compressed NBT format.
* <samp>[[idcounts.dat]]</samp> is stored in compressed NBT format.
+
*<samp>[[idcounts.dat]]</samp> is stored in compressed NBT format.
* <samp>[[villages.dat]]</samp> is stored in compressed NBT format.
+
*<samp>[[villages.dat]]</samp> is stored in compressed NBT format.
  +
*<samp>[[Raids.dat format|raids.dat]]</samp> is stored in compressed NBT format.
 
* <samp>[[Map item format|map_<#>.dat]]</samp> files are stored in compressed NBT format.
 
* <samp>[[Map item format|map_<#>.dat]]</samp> files are stored in compressed NBT format.
* <samp>[[Servers.dat format|servers.dat]]</samp>, which is used to store the list of saved multiplayer servers as uncompressed NBT.
+
*<samp>[[Servers.dat format|servers.dat]]</samp>, which is used to store the list of saved multiplayer servers as uncompressed NBT.
  +
*<samp>[[hotbar.nbt]]</samp>, which is used to save hotbars as uncompressed NBT format.
* [[Chunk format|Chunk]]s are stored in compressed NBT format within [[Region file format|Region]] files.
 
* <samp>[[Scoreboard#NBT format|scoreboard.dat]]</samp> is stored in compressed NBT format.
+
*[[Chunk format|Chunk]]s are stored in compressed NBT format within [[Region file format|Region]] files.
* [[Generated structures data file format|Generated structures]] are stored in compressed NBT format.
+
*<samp>[[Scoreboard#NBT format|scoreboard.dat]]</samp> is stored in compressed NBT format.
* [[Structure block file format|Saved structures]] are stored in compressed NBT format.
+
*[[Generated structures data file format|Generated structures]] are stored in compressed NBT format.
  +
*[[Structure block file format|Saved structures]] are stored in compressed NBT format.
   
== Official software ==
+
==Official software==
 
{{see also|Tutorials/Running the Data Generator}}
 
{{see also|Tutorials/Running the Data Generator}}
 
Mojang has provided sample Java NBT classes for developers to use and reference as part of the source code for the [[MCRegion]] to [[Anvil file format]] converter.<ref>http://www.mojang.com/2012/02/new-minecraft-map-format-anvil/</ref> Since [[Java Edition 1.13]], ''Minecraft'' includes a built-in converter between the SNBT format and compressed NBT format, which comes with both the [[client.jar|client]] and official server.<ref>https://wiki.vg/Data_Generators#NBT_converters</ref>
 
Mojang has provided sample Java NBT classes for developers to use and reference as part of the source code for the [[MCRegion]] to [[Anvil file format]] converter.<ref>http://www.mojang.com/2012/02/new-minecraft-map-format-anvil/</ref> Since [[Java Edition 1.13]], ''Minecraft'' includes a built-in converter between the SNBT format and compressed NBT format, which comes with both the [[client.jar|client]] and official server.<ref>https://wiki.vg/Data_Generators#NBT_converters</ref>
Line 252: Line 341:
 
The vanilla data generator can convert any GZip compressed NBT format to SNBT format. The file extension of a file can simply be changed, such as <samp>[[level.dat]]</samp> to <samp>level.nbt</samp> and put in the input folder, and the generator then decodes the GZip compressed NBT data.
 
The vanilla data generator can convert any GZip compressed NBT format to SNBT format. The file extension of a file can simply be changed, such as <samp>[[level.dat]]</samp> to <samp>level.nbt</samp> and put in the input folder, and the generator then decodes the GZip compressed NBT data.
   
== History ==
+
==History==
 
The NBT file format was described by [[Notch]] in a brief specification.<ref>http://web.archive.org/web/20110723210920/http://www.minecraft.net/docs/NBT.txt specification</ref>
 
The NBT file format was described by [[Notch]] in a brief specification.<ref>http://web.archive.org/web/20110723210920/http://www.minecraft.net/docs/NBT.txt specification</ref>
   
The original known version was 19132 as introduced in [[Beta 1.3]], and since then has been updated to 19133 with the [[Anvil file format]], which adds the {{cd|Int Array}} tag. The NBT format dates all the way back to [[Indev]] with tags 0 to 10 in use.
+
The original known version was 19132 as introduced in [[Beta 1.3]], and since then has been updated to 19133 with the [[Anvil file format]], which adds the {{cd|Int Array}} tag. The NBT format dates all the way back to [[Indev]] with tags 0 to 10 in use.
 
{{History|java}}
 
{{History|java}}
 
{{History||1.0.0|snap=September 28, 2011|slink={{tweet|notch|119296531592515584}}|Notch works on "saving arbitrary data with item instances."}}
 
{{History||1.0.0|snap=September 28, 2011|slink={{tweet|notch|119296531592515584}}|Notch works on "saving arbitrary data with item instances."}}
Line 264: Line 353:
 
{{History|foot}}
 
{{History|foot}}
   
== References ==
+
==References ==
 
{{reflist}}
 
{{reflist}}
   
== External links ==
+
==External links==
  +
* [https://wiki.vg/NBT NBT] on wiki.vg
 
* [http://www.minecraftforum.net/topic/840677-nbtexplorer/ NBTExplorer], a tool for viewing and editing NBT files.
+
*[https://github.com/iBuyMountainDew/nbt nbt], a Java library for working with the NBT format.
 
*[https://wiki.vg/NBT NBT] on wiki.vg
* [http://irath96.github.io/webNBT/ webNBT], an online tool for viewing and editing NBT files.
 
  +
*[http://www.minecraftforum.net/topic/840677-nbtexplorer/ NBTExplorer], a tool for viewing and editing NBT files.
  +
*[https://github.com/tryashtar/nbt-studio NBT Studio], successor to NBTExplorer that includes additional features like Bedrock support and SNBT.
 
*[http://irath96.github.io/webNBT/ webNBT], an online tool for viewing and editing NBT files.
  +
*[https://github.com/Foresteam/XNBTEdit/tags XNBTEdit], XML NBT editor and converter.
   
 
{{Java Edition}}
 
{{Java Edition}}
   
 
[[de:NBT]]
 
[[de:NBT]]
  +
[[es:Formato NBT]]
 
[[fr:Format NBT]]
 
[[fr:Format NBT]]
 
[[ja:NBTフォーマット]]
 
[[ja:NBTフォーマット]]

Revision as of 13:45, 25 June 2022

The Named Binary Tag (NBT) format is a tree data structure used by Minecraft in many save files to store arbitrary data. The format is comprised of a handful of tags. Tags have a numeric ID, a name, and a payload. A user-accessible version in the form of strings is the stringified Named Binary Tag (SNBT) format.

SNBT format

Information icon
This feature is exclusive to Java Edition. 

SNBT, also known as data tag, is often used in command in Java Edition. It can be described starting with key-value pairs enclosed in curly braces. One common usage of data tags in Java Edition is in commands, used to specify complex data for any entity.

A data tag consists of zero or more attribute-value pairs delimited by commas and enclosed in curly braces. Each attribute-value pair consists of an tag name and the tag's value, separated by a colon. Some values, however, may be a compound tag and themselves contain attribute-value pairs, allowing a data tag to describe a hierarchical data structure.

Example: {name1:123,name2:"sometext1",name3:{subname1:456,subname2:"sometext2"}}

Tag's name can be enclosed with double quotes if necessary.

It is different from the JSON format; hence, any JSON used in NBT, such as raw JSON text, must be enclosed within a string tag.

Format of each type

The defined data structures also expect the values to be of the correct type.

Data Tags Value Types
Type Description Format Example
 Byte A signed 8-bit integer, ranging from -128 to 127 (inclusive). <number>b or <number>B 34B, -20b
 Short A signed 16-bit integer, ranging from -32,768 to 32,767 (inclusive). <number>s or <number>S 31415s, -27183s
 Int A signed 32-bit integer, ranging from -2,147,483,648 and 2,147,483,647 (inclusive). <integer_number> 31415926
 Long A signed 64-bit integer, ranging from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (inclusive). <number>l or <number>L 31415926l
 Float A 32-bit, single-precision floating-point number, ranging from -3.4E+38 to +3.4E+38.

See IEEE floating point for details.

<number>f or <number>F 3.1415926f
 Double A 64-bit, double-precision floating-point, ranging from -1.7E+308 to +1.7E+308.

See IEEE floating point for details.

<decimal_number>, <number>d or <number>D 3.1415926
 String A sequence of characters, enclosed in quotes. For strings without commas, brackets, braces or spaces, quote enclosure is optional. Quotes can be either single quote ' or double ". Nested quotes can be included within a string by escaping the character with a \ escape. <a-zA-Z0-9 text>, "<text>" (" within needs to be escaped to \"), or '<text>' (' within needs to be escaped to \')

"Call me \"Ishmael\""

'Call me "Ishmael"'

'Call me \'Ishmael\''

"Call me 'Ishmael'"

 List An ordered list of tags, enclosed in square brackets and delimited by commas. The tags must be of the same type, determined by the first tag in the list. [<value>,<value>,...] [3.2,64.5,129.5]
 Compound An ordered list of attribute-value pairs, enclosed in curly braces and delimited by commas.

Each tag can be of any type.

{<tag name>:<value>,<tag name>:<value>,...} {X:3,Y:64,Z:129}
 Byte Array B; followed by an ordered list of 8-bit integers, delimited by commas. Tag is enclosed in square brackets. [B;<byte>b,<byte>B,...] [B;1b,2b,3b]
 Int Array I; followed by an ordered list of 32-bit integers, delimited by commas. Tag is enclosed in square brackets. [I;<integer>,<integer>,...] [I;1,2,3]
 Long Array L; followed by an ordered list of 64-bit integers, delimited by commas. Tag is enclosed in square brackets. [L;<long>l,<long>L,...] [L;1l,2l,3l]
 Boolean A value, expressed as true, false. It is resolved by the game into a  Byte tag as 0b (for false) and 1b (for true). true, false or 0b, 1b {doFoo:true}

NBT object

When the game is running, entities and block entities in loading chunks are stored in the memory. They are not stored with NBT, instead, they are just programmatic objects.

When processing NBT operations, the game needs to generate programmatic NBT object from entities/block entities, parse SNBT into NBT object, modify entities/blocks based on provided NBT object, or convert NBT object into SNBT.

Generating NBT object

When generating NBT from an entity/block, the entity/block's properties are added into programmatic NBT object.

Note that not all properties are added. For example, the value of whether a player is opening a chest won't be added into NBT object.

A value is added with certain data type. For example, a resource location will be converted to a string value.

These NBT objects will also be stored into game's save files as NBT files when the game quits or automatically saves. So the data structures that NBT tags describe and the data type for each tag are basically the same ones used in game's save files. These data structures are described in other articles and commands expect data tags to use the same attribute names (which are case-sensitive):

Data Structure Specification Links
Objects Examples
Block entities chests, furnaces, command blocks, mob spawners, signs, etc.
Items items in inventories (includes specifications for enchantments, lore, custom names, etc.)
Item entities items on the ground
Mobs creepers, cows, villagers, etc.
Projectiles arrows, fireballs, thrown potions, etc.
Vehicles boats, minecarts, etc.
Dynamic tiles primed TNT, falling sand/gravel/concrete powder/anvils
Other entities firework rockets, paintings, and item frames

Conversion to SNBT

Information icon
This feature is exclusive to Java Edition. 

A programmatic NBT object would be converted to a SNBT when trying to get it with /data get etc.

After converted, a number is always followed by a letter (lowercase for b, s, f, d, and uppercase for L) except  Integer. For example, 3s for a short, 3.2f for a float, etc.

And a string is always enclosed by double or single quotes.

Other data types are expressed as the #Format of each type table above.

Conversion from SNBT

Information icon
This feature is exclusive to Java Edition. 

An SNBT will be converted to a programmatic NBT object when parsed by the game.

A number that followed by a letter (B, S, L, F, D, or their lowercase) is resolved to corresponding data type. For example, 3s for a short, 3.2f for a float, etc. The letter can be uppercase or lowercase. When no letter is used, it assumes double if there's a decimal point, int if there's no decimal point and the size fits within 32 bits, or string if neither is true.

A square-bracketed literal is assumed to be a list unless an identifier is used: [I;1,2,3] for an int array and [L;1L,2L,3L] for a long array.

true and false are converted as 1b and 0b respectively.

Modifying entity/block based on NBT object

Information icon
This feature is exclusive to Java Edition. 

Modifying entity/block based on a programmatic NBT object is not a simple progress. All certain tags need to be resolved before changing properties of a block/entity. Note that only certain properties can be changed. For example, when using /data command to modify a block entity, its coordinates cannot be changed.

If a property needs a value of resource location and gets a  string tag, the string will be converted to a resource location.

If a property needs a value of JSON text and gets a  string tag, the string will be parsed into JSON text object.

If a property needs a numeric value of certain type and gets a numeric tag of wrong type, the number will get some rounding operation and converts to the required type.

If a property needs a numeric value and gets a non-numeric tag, the number will become 0.

If a property needs a string value and gets a non-string tag, the string will become an empty string.

If a property needs a list or array of certain type and gets a wrong-type tag, a empty list/array will be got.

If a property needs a compound tag and gets a non-compound tag, a empty compound tag will be got.

Testing NBT tags

Information icon
This feature is exclusive to Java Edition. 

When commands such as /clear, /execute if data are used to match data tags, or nbt argument in target selector tries to target entity, the game converts SNBT into programmatic NBT object and gets programmatic NBT object from block/entity/storage, then compares the two NBT objects.

They check only for the presence of the provided tags in the target entity/block/storage. This means that the entity/block/storage can have additional tags and still match. This is true even for lists: the order and number of elements in a list are not considered, and as long as every requested element is in the list, it matches even if there are additional elements. For example, an entity with data {Pos:[1d,2d,3d],Tags:["a","b"]} can be targeted by @e[nbt={Pos:[3d,2d,1d]}] or even just @e[nbt={Pos:[2d]}] even though the former represents a totally different position and the latter is not a valid position at all. Note that @e[nbt={Tags:[]}] can't match it, because an empty list can only match empty list.

However, the order and number of elements in an byte/long/int array is acknowledged.

The requested data tags in the target entity/block/storage must match exactly for the provided tags to pass, including the data type (e.g. 1, an int, will not match 1d, a double). Namespaces also can't omitted because in NBT object it is just a plain string that won't be resolved into a resource location (e.g. @e[nbt={Item:{id:"stone"}}] will not match a stone item entity, it must be @e[nbt={Item:{id:"minecraft:stone"}}]). The same is true for string of JSON text, which must be exactly the same to match the provided tag (e.g. @e[nbt={CustomName:'"a"'}] will not match any entity, it must be @e[nbt={CustomName:"{\"text\":\"a\"}"}] or @e[nbt={CustomName:'{"text":"a"}'}]).

Binary format

An NBT file is a zipped Compound tag, with the name and tag ID included. The file in the zip must contain the Compound tag that it is as the first bytes. 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.

TAG definition

A tag is an individual part of the data tree. The first byte in a tag is the tag type (ID), followed by a two byte big-endian unsigned integer for the length of the name, then the name as a string in UTF-8 format (Note TAG_End is not named and does not contain the extra 2 bytes; the name is assumed to be empty). Finally, depending on the type of the tag, the bytes that follow are part of that tag's payload. This table describes each of the 13 known tags in version 19133 of the NBT format:

ID Icon Tag Type Payload Description Storage Capacity
0 TAG_End - Used to mark the end of compound tags. This tag does not have a name, so it is only ever a single byte 0. It may also be the type of empty List tags. N/A
1 TAG_Byte 1 byte / 8 bits, signed A signed integral type. Sometimes used for booleans. Full range of -(27) to (27 - 1)
(-128 to 127)
2 TAG_Short 2 bytes / 16 bits, signed, big endian A signed integral type. Full range of -(215) to (215 - 1)
(-32,768 to 32,767)
3 TAG_Int 4 bytes / 32 bits, signed, big endian A signed integral type. Full range of -(231) to (231 - 1)
(-2,147,483,648 to 2,147,483,647)
4 TAG_Long 8 bytes / 64 bits, signed, big endian A signed integral type. Full range of -(263) to (263 - 1)
(-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807)
5 TAG_Float 4 bytes / 32 bits, signed, big endian, IEEE 754-2008, binary32 A signed floating point type. Precision varies throughout number line;
See Single-precision floating-point format. Maximum value about 3.4*1038
6 TAG_Double 8 bytes / 64 bits, signed, big endian, IEEE 754-2008, binary64 A signed floating point type. Precision varies throughout number line;
See Double-precision floating-point format. Maximum value about 1.8*10308
7 TAG_Byte_Array TAG_Int's payload size, then size TAG_Byte's payloads. An array of bytes. Maximum number of elements ranges between (231 - 9) and (231 - 1) (2,147,483,639 and 2,147,483,647), depending on the specific JVM.
8 TAG_String A TAG_Short-like, but instead unsigned[1] payload length, then a UTF-8 string resembled by length bytes. A UTF-8 string. It has a size, rather than being null terminated. 65,535 bytes interpretable as UTF-8 (see modified UTF-8 format; most commonly-used characters are a single byte).
9 TAG_List TAG_Byte's payload tagId, then TAG_Int's payload size, then size tags' payloads, all of type tagId. A list of tag payloads, without repeated tag IDs or any tag names. Due to JVM limitations and the implementation of ArrayList, the maximum number of list elements is (231 - 9), or 2,147,483,639. Also note that List and Compound tags may not be nested beyond a depth of 512.
10 TAG_Compound Fully formed tags, followed by a TAG_End. A list of fully formed tags, including their IDs, names, and payloads. No two tags may have the same name. Unlike lists, there is no hard limit to the number of tags within a Compound (of course, there is always the implicit limit of virtual memory). Note, however, that Compound and List tags may not be nested beyond a depth of 512.
11 TAG_Int_Array TAG_Int's payload size, then size TAG_Int's payloads. An array of TAG_Int's payloads. Maximum number of elements ranges between (231 - 9) and (231 - 1) (2,147,483,639 and 2,147,483,647), depending on the specific JVM.
12 TAG_Long_Array TAG_Int's payload size, then size TAG_Long's payloads. An array of TAG_Long's payloads. Maximum number of elements ranges between (231 - 9) and (231 - 1) (2,147,483,639 and 2,147,483,647), depending on the specific JVM.

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.

Usage

Minecraft sometimes uses the NBT format inconsistently; 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:

  • The root tag for most Minecraft NBT structures.
    •  SomeName: The only tag contained within the root tag - it has a name and contains all the actual data.

Additionally, there is also inconsistent use of letter case, mostly either camelCase or PascalCase, but sometimes even in all lowercase.

Uses

This section is missing information about Bedrock Edition NBTs. 
Please expand the section to include this information. Further details may exist on the talk page.
  • level.dat is stored in compressed NBT format.
  • <player>.dat files are stored in compressed NBT format.
  • idcounts.dat is stored in compressed NBT format.
  • villages.dat is stored in compressed NBT format.
  • raids.dat is stored in compressed NBT format.
  • map_<#>.dat files are stored in compressed NBT format.
  • servers.dat, which is used to store the list of saved multiplayer servers as uncompressed NBT.
  • hotbar.nbt, which is used to save hotbars as uncompressed NBT format.
  • Chunks are stored in compressed NBT format within Region files.
  • scoreboard.dat is stored in compressed NBT format.
  • Generated structures are stored in compressed NBT format.
  • Saved structures are stored in compressed NBT format.

Official software

Mojang has provided sample Java NBT classes for developers to use and reference as part of the source code for the MCRegion to Anvil file format converter.[2] Since Java Edition 1.13, Minecraft includes a built-in converter between the SNBT format and compressed NBT format, which comes with both the client and official server.[3]

The data generator from Minecraft is able to convert uncompressed Stringified NBT files with .snbt extension in an input folder to GZip compressed NBT format files with .nbt extension in an output folder, and vice versa.

The vanilla data generator can convert any GZip compressed NBT format to SNBT format. The file extension of a file can simply be changed, such as level.dat to level.nbt and put in the input folder, and the generator then decodes the GZip compressed NBT data.

History

The NBT file format was described by Notch in a brief specification.[4]

The original known version was 19132 as introduced in Beta 1.3, and since then has been updated to 19133 with the Anvil file format, which adds the Int Array tag. The NBT format dates all the way back to Indev with tags 0 to 10 in use.

Java Edition
1.0.0
{{Extension DPL}}<ul><li>[[Ghast Tear|Ghast Tear]]<br/>{{Item
| image = Ghast Tear.png
| renewable = Yes
| stackable = Yes (64)
}}

'''Ghast tears''' are items [[Drops|dropped]] by [[ghast]]s. They can be used to make potions of [[Regeneration]] and [[end crystal]]s.

== Obtaining ==

=== Mob loot ===
[[Ghast]]s drop 0–1 ghast tears. [[Looting]] increases the maximum ghast tears dropped by one per level, for a maximum of 4 ghast tears with Looting III. Looting also works when knocking back a [[fireball]] with an enchanted item.

== Usage ==

=== Brewing ingredient ===
{{brewing
  |showname=1
  |head=1
  |Ghast Tear
  |Mundane Potion
  |base=Water Bottle
}}
{{brewing
  |foot=1
  |Ghast Tear
  |Potion of Regeneration
}}

=== Crafting ingredient ===

{{crafting usage}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Ghast Tear
|spritetype=item
|nameid=ghast_tear
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Ghast Tear
|spritetype=item
|nameid=ghast_tear
|id=424
|form=item
|foot=1}}

== History ==

{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease|[[File:Ghast Tear JE1 BE1.png|32px]] Added ghast tears.}}
{{History|||snap=Beta 1.9 Prerelease 3|Ghast tears can now be brewed in a [[water bottle]] to create a [[mundane potion]], or in an [[awkward potion]] to create a [[potion of Healing]].}}
{{History|||snap=Beta 1.9 Prerelease 4|Ghast tears now create [[potion of regeneration|potions of Regeneration]]. This was due to the sheer difficulty in obtaining them.<ref>{{tweet|jeb|123671273904680960|Since Ghast Tears are so hard to get, I've decided to replace the "Instant Health" with "Regeneration" for them|October 11, 2011}}</ref> [[Glistering melon]]s have been added to create potions of Healing, instead.}}
{{History||1.9|snap=15w44b|A ghast tear is now used to [[crafting|craft]] an [[end crystal]].}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 370.}}
{{History||1.14|snap=18w43a|[[File:Ghast Tear JE2 BE2.png|32px]] The texture of ghast tears has been changed.}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Ghast Tear JE1 BE1.png|32px]] Added ghast tears.|Ghast tears are currently unobtainable as [[ghast]]s don’t [[drops|drop]] them.}}
{{History|||snap=build 7|Ghasts now drop ghast tears.<ref>{{bug|MCPE-9338}}</ref>}} 
{{History|pocket}}
{{History||1.0.0|snap=alpha 0.17.0.1|A ghast tear is now used to [[crafting|craft]] an [[end crystal]].}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Ghast Tear JE2 BE2.png|32px]] The texture of ghast tears has been changed.}}

{{History|console}}
{{History||xbox=TU7|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Ghast Tear JE1 BE1.png|32px]] Added ghast tears.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Ghast Tear JE2 BE2.png|32px]] The texture of ghast tears has been changed.}}

{{History|New 3DS}}
{{History||0.1.0|[[File:Ghast Tear JE1 BE1.png|32px]] Added ghast tears.}}
{{History|foot}}

== Issues ==

{{issue list}}

== References ==

{{reflist}}

{{items}}

[[Category:Renewable resources]]
[[Category:Brewing recipe]]

[[cs:Ďasova slza]]
[[de:Ghast-Träne]]
[[es:Lágrima de ghast]]
[[fr:Larme de Ghast]]
[[hu:Kísértetkönny]]
[[it:Lacrima di ghast]]
[[ja:ガストの涙]]
[[ko:가스트 눈물]]
[[nl:Ghasttraan]]
[[pl:Łza ghasta]]
[[pt:Lágrima de ghast]]
[[ru:Слеза гаста]]
[[uk:Сльоза ґаста]]
[[zh:恶魂之泪]]</li><li>[[Poisonous Potato|Poisonous Potato]]<br/>{{Item
| title = Poisonous Potato
| image = Poisonous Potato.png
| heals = {{hunger|2}}
|effects={{EffectLink|Poison}} (0:05) (60% chance)
| stackable = Yes (64)
| renewable = Yes
}}

A '''poisonous potato''' is a type of [[potato]] that can [[poison]] the [[player]].

== Obtaining ==

The poisonous potato is a rare [[drop]] when harvesting (destroying) [[potato|potato crops]]; a fully grown plant has a 2% chance of dropping one in addition to the 2-5 regular potatoes.

=== Chest loot ===

{{LootChestItem|poisonous-potato}}

== Usage ==
Poisonous potatoes cannot be planted on [[farmland]] or [[Baked Potato|baked]]. They also have no use with the [[composter]].<ref>{{bug|MC-142373|resolution=WAI}}</ref>

=== Food ===
{{see also|Tutorials/Hunger management|title1=Hunger management}}
To eat a poisonous potato, press and hold {{control|use}} while it is selected in the hotbar. Eating one restores {{hunger|2}} [[hunger]] and 1.2 hunger [[Hunger#Mechanics|saturation]] and has a 60% chance of applying 5 seconds of [[Poison]] II, draining {{hp|4|poisoned=1}} points of [[health]].
Interestingly, a poisonous potato actually restores double the hunger and saturation than a normal, unpoisoned potato. (A normal potato gives {{hunger|1}} hunger and 0.6 saturation points.)

==Sounds==
{{Sound table/Entity/Food}}

== Advancements ==
{{load advancements|Husbandry;A Balanced Diet}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Poisonous Potato
|spritetype=item
|nameid=poisonous_potato
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Poisonous Potato
|spritetype=item
|nameid=poisonous_potato
|id=282
|form=item
|foot=1}}

== History ==

{{History|java}}
{{History||1.4.2|snap=12w34a|[[File:Poisonous Potato JE1 BE1.png|32px]] Added poisonous potatoes.}}
{{History||1.13|snap=17w47a|Prior to [[Java_Edition_1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 394.}}
{{History|||snap=18w11a|Poisonous potatoes now generate in the [[chest]]s of [[shipwreck]]s.}}
{{History||1.14|snap=18w43a|[[File:Poisonous Potato JE2.png|32px]] The texture of poisonous potatoes has been changed.}}
{{History|||snap=18w50a|[[File:Poisonous Potato JE3 BE2.png|32px]] The texture of poisonous potatoes has been changed, once again.}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Poisonous Potato JE1 BE1.png|32px]] Added poisonous potatoes.}}
{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.14.2|Poisonous potatoes can now be found inside of [[shipwreck]] [[chest]]s.}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Poisonous Potato JE3 BE2.png|32px]] The texture of poisonous potatoes has been changed.}}

{{History|console}}
{{History||xbox=TU14|xbone=CU1|ps=1.04|wiiu=Patch 1|switch=1.0.1|[[File:Poisonous Potato JE1 BE1.png|32px]] Added poisonous potatoes.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Poisonous Potato JE3 BE2.png|32px]] The texture of poisonous potatoes has been changed.}}

{{History|New 3DS}}
{{History||0.1.0|[[File:Poisonous Potato JE1 BE1.png|32px]] Added poisonous potatoes.}}
{{History|foot}}

== Issues ==
{{issue list}}

== References ==
{{reflist}}

{{Items}}

[[Category:Plants]]

[[cs:Jedovatá brambora]]
[[de:Giftige Kartoffel]]
[[es:Patata envenenada]]
[[fr:Pomme de terre empoisonnée]]
[[hu:Mérgező burgonya]]
[[it:Patata velenosa]]
[[ja:青くなったジャガイモ]]
[[ko:독이 있는 감자]]
[[nl:Giftige aardappel]]
[[pl:Trujący ziemniak]]
[[pt:Batata venenosa]]
[[ru:Ядовитый картофель]]
[[th:มันฝรั่งพิษ]]
[[uk:Отруйна картопля]]
[[zh:毒马铃薯]]
[[Category:Food]]
[[Category:Renewable resources]]</li></ul>
September 28, 2011Notch works on "saving arbitrary data with item instances."
1.8
{{Extension DPL}}<ul><li>[[La Baguette|La Baguette]]<br/>{{Exclusive|Java}}
{{Joke feature}}
{{WIP}}

{{Item
| rarity = Common
| renewable = Yes
| durability = 59
| stackable = No
}}

'''La Baguette''' is a joke weapon from [[Java Edition 23w13a_or_b]]. Its stats are identical to a wooden [[sword]], though La Baguette cannot be used to fuel furnaces.

== Obtaining ==
One [[Le Tricolore|tricolore]] and one baguette is given to all players when [[French mode]] gets activated.

=== Repairing ===
==== Grinding ====
{{Grinding
|showdescription=1
|ingredients=2x La Baguette
|La Baguette
|La Baguette
|La Baguette
|description=The durability of the two baguettes is added together, plus an extra 5% durability. Any enchantments, besides curses, would be removed.
}}

====Unit repair====
Strangely, La Baguette can be repaired using planks rather than bread, just like a wooden sword.
{{Anvil|Input1=Damaged La Baguette|Input2=Damaged La Baguette; Any Planks|Output=La Baguette}}

==Usage==
La Baguette functions identically to a wooden sword.

===Attacking===
It can be used to damage mobs for {{hp|4}} health points. La Baguette has an attack speed of 1.6 and takes 0.625 seconds to [[Damage#Attack cooldown|recover]].

=== Breaking ===
La Baguette, just like other swords, can be used to break certain blocks 50% faster. See [[Sword#Sword breaking times]] for more.

=== Enchantments ===
La Baguette, like other swords, can receive the following [[enchantment]]s:

{| class="wikitable sortable col-2-center col-3-right"
|+
!Name
!Max Level
![[Enchanting|Method]]
!Weight
|-
|[[Fire Aspect]]
|II
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|2
|-
|[[Looting]]
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|2
|-
|[[Unbreaking]]
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|5
|-
|[[Sharpness]]<ref group=note name=note1>Sharpness, Smite, and Bane of Arthropods are mutually exclusive.</ref>
|V
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|10
|-
|[[Smite]]<ref group=note name=note1/>
|V
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|5
|-
|[[Bane of Arthropods]]<ref group="note" name=note1/>
|V
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|5
|-
|[[Knockback]]
|II
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|5
|-
|[[Mending]]
|I
|{{Inventory slot|Anvil}}
|2
|-
|[[Curse of Vanishing]]
|I
|{{Inventory slot|Anvil}}
|1
|-
|[[Sweeping Edge]]{{Only|java|short=1}}
|III
|{{Inventory slot|Enchanting Table}}{{Inventory slot|Anvil}}
|2
|}

{{Notelist}}

==Trivia==
This item is simply called "Baguette" in the official French translation, without an article.

{{Items}}
{{Jokes}}

[[Category:Tools]]
[[Category:Combat]]

[[ja:La Baguette]]
[[pt:La Baguette]]
[[Category:Joke items]]</li><li>[[Light Gray Dye|Light Gray Dye]]<br/>{{Item
| image = Light Gray Dye.png
| renewable = Yes
| stackable = Yes (64)
}}
'''Light gray dye'''{{fn|Known as '''Light Grey Dye''' in British, Canadian, Australian, and New Zealand English variants.}} is a [[Dyeing#Primary Colors|quasi-primary dye]].

== Obtaining ==

=== Crafting ===

{{Crafting
  |head=1
  |showname=0
  |showdescription=1
  |Azure Bluet;Oxeye Daisy;White Tulip
  |Output=Light Gray Dye
  |type=Material
}}
{{Crafting
  |Black Dye
  |White Dye
  |White Dye
  |Output=Light Gray Dye,3
  |type=Material
  |description={{IN|bedrock}}, the black and white dye can be replaced with [[ink sac]]s and [[bone meal]], respectively.
}}
{{Crafting
  |Gray Dye
  |White Dye
  |Output=Light Gray Dye,2
  |type=Material
  |description={{IN|bedrock}}, the white dye can be replaced with [[bone meal]].
  |foot=1
}}

=== Trading ===

[[Wandering trader]]s sell 3 light gray dye for an [[emerald]].

== Usage ==

{{dye usage}}

=== Crafting ingredient ===

{{crafting usage|ignore=Banner|continue=1}}
{{banner crafting usage}}

=== Loom ingredient ===
{{Banner loom usage|Light Gray Dye}}

=== Trading ===
Expert-level shepherd villagers have {{frac|1|6}} chance to buy 12 light gray dye for an emerald.

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Light Gray Dye
|spritetype=item
|nameid=light_gray_dye
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|showaliasids=y
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Light Gray Dye
|spritetype=item
|nameid=light_gray_dye
|aliasid=dye / 7
|id=402
|form=item
|translationkey=item.dye.silver.name
|foot=1}}

== Video ==

<div style="text-align:center">{{yt|1w3j1SKcoww}}</div>

== History ==

{{History|java beta}}
{{History||1.2|[[File:Light Gray Dye JE1 BE1.png|32px]] Added light gray dye.}}
{{History|java}}
{{History||1.4.2|snap=12w34a|Added the ability to [[Armor#Dyeing|dye]] leather [[armor]] and [[wolf]] collars.}}
{{History||1.4.6|snap=12w49a|Light gray dye can now be [[crafting|crafted]] with [[gunpowder]] to create a [[firework star]].}} 
{{History||1.6.1|snap=13w19a|[[Stained clay]] can now be crafted.}}
{{history||1.7.2|snap=13w36a|With the addition of new [[flower]]s, many secondary and tertiary dyes are now primary [[dye]]s.}}
{{History|||snap=13w41a|[[Stained glass]] can now be crafted.}}
{{History||1.8|snap=14w30a|Added [[banner]]s, which can be dyed.}}
{{History||1.11|snap=16w39a|Added the ability to dye [[shulker box]]es.}}
{{History||1.12|snap=17w15a|Added the ability to dye [[bed]]s.}}
{{History||1.13|snap=17w47a|The different data values for the <code>dye</code> ID have now been split up into their own IDs.
|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 351.}}
{{History||1.14|snap=18w43a|Light gray dye is now crafted using [[white dye|white]] and [[black dye]]s, instead of [[bone meal]] and [[ink sac]]s.
|[[File:Light Gray Dye JE2 BE2.png|32px]] The texture of light gray dye has now been changed.}}
{{History|||snap=18w44a|Light gray dye can now change the text color on [[sign]]s to light gray.}}
{{History|||snap=19w05a|Added the [[wandering trader]], which sells light gray dye.}}
{{History|||snap=19w11a|Light gray dye can now be [[trading|bought]] by shepherd villagers.}}
{{History||1.17|snap=20w45a|Light gray dye can now be used to craft [[light gray candle]]s.}}
{{History|||snap=21w19a|Light gray dye can no longer be used to craft light gray candles.}}
{{History|||snap=Pre-release 1|Light gray dye can now once again be used to craft light gray candles.}}
{{History||1.20<br>(Experimental)|link=1.19.3|snap=22w42a|Light gray dye can now change the text color on [[hanging sign]]s to light gray.}}

{{History|pocket alpha}}
{{History||v0.3.0|[[File:Light Gray Dye JE1 BE1.png|32px]] Added light gray dye. It is currently unobtainable and serves no purpose.}}
{{History||v0.8.0|snap=build 1|Light gray dye can be [[craft]]ed with [[bone meal]] and [[gray dye]], or with two bone meals and an [[ink sac]], despite there being no way of obtaining gray dye or ink sacs at the time.}}
{{History||v0.8.0|snap=build 3|Light gray dye is now available in [[creative]] mode.}}
{{History||v0.9.0|snap=build 3|Light gray dye can now be obtained in [[survival]] mode.}}
{{History|||snap=build 11|Light gray dye can now be used to craft colored [[terracotta]].}}
{{History||v0.11.0|snap=build 1|Light gray dye can now be used to dye tamed [[wolf]] collars.}}
{{History||v0.14.0|snap=build 1|Light gray dye can now be used to dye [[water]] in [[cauldron]]s.}}
{{History|pocket}}
{{History||1.0.0|snap=alpha 0.17.0.1|Light gray dye can now be used to dye [[shulker]]s.}}
{{History||1.1.0|snap=alpha 1.1.0.0|Light gray dye can now be used to craft [[concrete powder]], colored [[bed]]s and dyed [[shulker box]]es.}}
{{History|bedrock}}
{{History||1.2.0|snap=beta 1.2.0.2|Light gray dye can now be used to craft [[firework star]]s, [[stained glass]] and patterns on [[banner]]s.}}
{{History||1.4.0|snap=beta 1.2.20.1|Light gray dye can now be used to craft [[balloon]]s and [[glow stick]]s.}}
{{History||1.8.0|snap=beta 1.8.0.8|Light gray dye can now be used to dye tamed [[cat]] collars.}}
{{History||1.10.0|snap=beta 1.10.0.3|Light gray dye is now [[trading|sold]] by [[wandering trader]]s.
|Light gray dye can now be used to dye white [[carpet]]s and undyed [[glass pane]]s.
|[[File:Light Gray Dye JE2 BE2.png|32px]] The texture of light gray dye has now been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Light gray dye can be [[trading|sold]] to shepherd [[villager]]s.}}
{{History||1.16.100|snap=beta 1.16.100.56|The ID of light gray dye has been changed from <code>dye/7</code> to <code>light_gray_dye</code>.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.00|switch=1.0.1|wiiu=Patch 1|[[File:Light Gray Dye JE1 BE1.png|32px]] Added light gray dye.}}
{{History|PS4}}
{{History||1.90|[[File:Light Gray Dye JE2 BE2.png|32px]] The texture of light gray dye has now been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Light Gray Dye JE1 BE1.png|32px]] Added light gray dye.}}
{{History|foot}}

== Issues ==

{{issue list}}

== Trivia ==

* In [[Bedrock Edition]], Some items/blocks' Block states/Item NBT uses '''Silver''' instead of '''Light Gray''' 

== Notes ==
{{fnlist}}

{{Items}}

[[Category:Dyes]]

[[cs:Světle šedé barvivo]]
[[de:Hellgrauer Farbstoff]]
[[es:Tinte gris claro]]
[[fr:Teinture gris clair]]
[[hu:Világosszürke festék]]
[[ja:薄灰色の染料]]
[[ko:회백색 염료]]
[[nl:Lichtgrijze kleurstof]]
[[pl:Jasnoszary barwnik]]
[[pt:Corante cinza-claro]]
[[ru:Светло-серый краситель]]
[[zh:淡灰色染料]]
[[Category:Renewable resources]]</li></ul>
14w03aNBT data now supports using string IDs rather than numerical IDs.
1.12
{{Extension DPL}}<ul><li>[[Dried Kelp|Dried Kelp]]<br/>{{about|the item|the block|Dried Kelp Block}}
{{Item
| title = Dried Kelp
| image = Dried Kelp.png
| renewable = Yes
| heals = {{hunger|1}}
| stackable = Yes (64)
}}

'''Dried kelp''' is a [[food]] item that can be quickly eaten by the [[player]]. It can also be crafted into [[Dried Kelp Block|dried kelp blocks]].

== Obtaining ==

=== Cooking ===
[[Kelp]] can be cooked in a [[furnace]], [[smoker]], or [[campfire]]. Each piece of dried kelp removed from a furnace output slot gives 0.1 [[experience]] (6.4 experience per stack).
{{Smelting
|Kelp
|Dried Kelp
|0,1
}}

=== Crafting ===
{{Crafting
 |Dried Kelp Block
 |Output= Dried Kelp,9
 |type= Foodstuff
}}

== Usage ==

=== Food ===
[[File:Eating dried kelp.png|thumb|A player eating dried kelp.]]
To eat dried kelp, press and hold {{control|use}} while it is selected in the hotbar. Eating one restores {{hunger|1}} [[hunger]] and 0.6{{only|je|short=1}} / 0.2{{only|be|short=1}} hunger [[Hunger#Mechanics|saturation]].

A player can consume dried kelp about twice as fast as any other food item in the game.

=== Crafting ingredient ===

{{Crafting usage}}

=== Composting ===
Dried kelp placed into a [[composter]] has a 30% chance of raising the compost level by 1.

==Sounds==
{{Sound table/Entity/Food}}

== Achievements ==

{{load achievements|Castaway}}

== Advancements ==

{{load advancements|Husbandry;A Balanced Diet}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Dried Kelp
|spritetype=item
|nameid=dried_kelp
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Dried Kelp
|spritetype=item
|nameid=dried_kelp
|id=270
|form=item
|foot=1}}

== History ==

{{History|java}}
{{History||1.13|snap=18w07a|[[File:Dried Kelp JE1.png|32px]] Added dried kelp.}}
{{History|||snap=18w08b|Dried kelp can now be used to craft [[dried kelp block]]s.}}
{{History||1.14|snap=19w03a|Placing dried kelp into the new [[composter]] has a 10% chance of raising the compost level by 1.}}
{{History|||snap=19w05a|Dried kelp now has a 30% chance of increasing the compost level in a composter.}}

{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.14.2|[[File:Dried Kelp BE1.png|32px]] Added dried kelp.}}
{{H||1.11.0|snap=beta 1.11.0.1|Dried kelp can now be used to fill up [[composter]]s.}}
{{History||1.17.10|snap=beta 1.17.10.20|[[FIle:Dried Kelp JE1.png|32px]] The texture of dried kelp has been changed to match ''Java Edition''.}}

{{History|console}}
{{History||xbox=TU69|ps=1.76|wiiu=Patch 38|[[File:Dried Kelp BE1.png|32px]] Added dried kelp.}}
{{History|foot}}

== Issues ==

{{issue list}}

{{Items}}

[[Category:Food]]
[[Category:Renewable resources]]

[[de:Getrockneter Seetang]]
[[es:Algas secas]]
[[fr:Algue séchée]]
[[ja:乾燥した昆布]]
[[ko:말린 켈프]]
[[lzh:乾海帶]]
[[nl:Gedroogde kelp]]
[[pl:Suszone wodorosty]]
[[pt:Algas secas]]
[[ru:Сушёная ламинария]]
[[th:สาหร่ายทะเลแห้ง]]
[[zh:干海带]]</li><li>[[Raw Porkchop|Raw Porkchop]]<br/>{{Item
| title = Raw Porkchop
| image = Raw Porkchop.png
| renewable = Yes
| heals = {{hunger|3}}
| stackable = Yes (64)
}}
A '''raw porkchop''' is a [[food]] item that can be eaten by the [[player]] or cooked to make a [[cooked porkchop]].

== Obtaining ==

=== Mob loot ===

==== Pigs ====

Adult [[pig]]s drop 1–3 raw porkchop when killed. The maximum amount is increased by 1 per level of [[Looting]], for a maximum of 1-6 with Looting III. If killed while on fire, they drop [[cooked porkchop]] instead.

==== Hoglins ====

Adult [[hoglin]]s drop 2–4 raw porkchop when killed. The maximum amount is increased by 1 per level of [[Looting]], for a maximum of 7 with Looting III. If killed while on fire, they drop [[cooked porkchop]] instead.

=== Chest loot ===

{{LootChestItem|raw-porkchop}}

== Usage ==

=== Food ===

To eat raw porkchop, press and hold {{control|use}} while it is selected in the hotbar. Eating one restores {{hunger|3}} [[hunger]] and 0.6 [[Hunger#Mechanics|saturation]].

=== Smelting ingredient ===

{{Smelting
|showname=1
|Raw Porkchop
|Cooked Porkchop
|0.35
}}

=== Trading ===

{{IN|bedrock}}, novice-level butcher [[villager]]s have a {{frac|1|3}} chance to [[trading|buy]] 7 raw porkchop for an [[emerald]] as part of their [[trading|trades]].

{{IN|java}}, novice-level butcher villagers have a 40% chance to buy 7 raw porkchop for an emerald.

=== Wolves ===

Raw porkchops can be used to [[breed]] and heal tamed [[wolves]], lead them around, and make baby tamed wolves grow up faster by 10% of the remaining time.

=== Piglins ===
[[Piglin|Piglins]] instantly pick up raw or [[Cooked Porkchop|cooked porkchops]] that are within 1 block of them, unless they have already picked up one within the last 10 seconds. Porkchops picked up are not dropped upon the piglin's death.

==Sounds==
{{Sound table/Entity/Food}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showitemtags=y
|showforms=y
|generatetranslationkeys=y
|displayname=Raw Porkchop
|spritetype=item
|nameid=porkchop
|itemtags=piglin_food
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Raw Porkchop
|spritetype=item
|nameid=porkchop
|id=262
|form=item
|foot=1}}

== Achievements ==
{{load achievements|Pork Chop}}

== Advancements ==
{{load advancements|Husbandry;A Balanced Diet}}

== History ==

{{History|java indev}}
{{History||20100219|[[File:Raw Porkchop JE1 BE1.png|32px]] Added raw porkchops. 
|Raw porkchops restore {{hp|3}} and do not stack in the [[inventory]].
|Raw porkchops are [[drops|dropped]] by [[pig]]s.}}
{{History|java beta}}
{{History||1.4|Raw porkchops can now be given to [[wolf|wolves]].}}
{{History||1.8|snap=Pre-release|Raw porkchops can now be stacked to 64.<ref>{{Tweet|jeb|103408168356421632|Some Minecraft food changes...}}</ref> 
|Raw porkchops now restore {{hunger|3}} to the [[Hunger|food bar]].}}
{{History|java}}
{{History||1.2.1|snap=12w03a|Raw porkchops can now be used to breed wolves.}}
{{History||1.3.1|snap=12w21a|Raw porkchops can now be [[trading|sold]] to butcher [[villager]]s, at 14–17 pork chops for 1 [[emerald]].}}
{{History|||snap=12w25a|[[Pig]]s now [[drops|drop]] 1–3 porkchops instead of 0–2.}}
{{History||1.4.2|snap=12w37a|[[File:Raw Porkchop JE2 BE2.png|32px]] The texture of raw porkchops has been changed, so that it no longer has a dark outline.}}
{{History||1.8|snap=14w02a|[[Trading]] has been changed; butcher villagers now [[trading|buy]] 14–18 porkchops for 1 emerald.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 319.}}
{{History||1.14|snap=18w43a|[[File:Raw Porkchop.png|32px]] The texture of raw porkchops has been changed.}}
{{History|||snap=18w49a|Raw porkchops can now be found in [[chest]]s in [[village]] butcher shops.}}
{{History||1.16|snap=20w07a|Raw porkchops are dropped by the new [[hoglin]]s.
|Raw porkchops have a {{frac|5|109}} (~4.59%) chance of being given by the new [[piglin]]s when [[bartering]], in a stack size of 2–5.}}
{{History|||snap=20w09a|Raw porkchops can no longer be obtained by bartering with piglins.}}
{{History|||snap=20w16a|Raw porkchops now generate in [[bastion remnants]] chests.}}

{{History|pocket alpha}}
{{History||v0.4.0|[[File:Raw Porkchop JE1 BE1.png|32px]] Added raw porkchops.}}
{{History||v0.5.0|Raw porkchops now restore {{hp|3}} instead of {{hp|1}}.}}
{{History||v0.8.0|snap=build 1|[[File:Raw Porkchop JE2 BE2.png|32px]] The texture of raw porkchops has been changed, so that it no longer has that dark outline.}}
{{History||v0.12.1|snap=build 1|Raw porkchops now restore [[hunger]] instead of [[health]].}}
{{History||v0.16.2|[[Pig]]s now [[drops|drop]] 1–3 raw porkchops rather than 0–2.}}
{{History|pocket}}
{{History||1.0.4|snap=alpha 1.0.4.0|14–18 raw porkchops can now be [[trading|sold]] to butcher [[villager]]s for an [[emerald]].}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Raw Porkchop.png|32px]] The texture of raw porkchops has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.3|Raw porkchops can now be found in [[village]] butcher [[chest]]s.}}
{{History|||snap=beta 1.11.0.4|Butcher [[villager]]s now have {{frac|1|3}} chance to [[trading|buy]] 7 raw porkchops.}}

{{History|console}}
{{History||xbox=TU1|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Raw Porkchop JE1 BE1.png|32px]] Added raw porkchops.}}
{{History||xbox=TU5|Raw porkchops are now stackable to 64 and fills [[hunger]] instead of [[health]].}}
{{History||xbox=TU12|[[File:Raw Porkchop JE2 BE2.png|32px]] The texture of raw porkchops has been changed, so that it no longer has a dark outline.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Raw Porkchop.png|32px]] The texture of raw porkchops has been changed.}}

{{History|new3DS}}
{{History||0.1.0|[[File:Raw Porkchop JE2 BE2.png|32px]] Added raw porkchops.}}
{{History|foot}}

== Issues ==

{{issue list}}

== Gallery ==
<gallery>
I Porkchop Minecraft JINX.jpg|Official T-shirt artwork "I Porkchop Minecraft" sold by [https://www.jinx.com JINX].
I Brake for Porkchop Bumper Sticker JINX.jpg|An official bumper sticker featuring a raw porkchop sold by JINX.
</gallery>

== References ==
{{reflist}}

== External Links ==
*[https://www.minecraft.net/en-us/article/taking-inventory--porkchop Taking Inventory: Porkchop] – Minecraft.net on February 13, 2020

{{Items}}

[[Category:Food]]

[[cs:Syrová kotleta]]
[[de:Rohes Schweinefleisch]]
[[es:Chuleta de cerdo cruda]]
[[fr:Côtelette de porc crue]]
[[hu:Nyers disznóhús]]
[[ja:生の豚肉]]
[[nl:Rauw varkensvlees]]
[[pl:Surowy schab]]
[[pt:Costeleta de porco crua]]
[[ru:Сырая свинина]]
[[uk:Сира свинина]]
[[zh:生猪排]]
[[Category:Renewable resources]]</li></ul>
?Added long array tags.
1.13
{{Extension DPL}}<ul><li>[[Tool|Tool]]<br/>{{About|the in-game items|program enhancing software|Programs and Editors}}

A '''tool''' is an [[item]] used by the [[player]] while held to perform actions faster and more efficiently, to gather materials not obtainable by hand, to gain information, or to perform completely new actions. With the exception of the [[clock]], [[compass]], empty [[bucket]], and [[lead]], tools do not stack in the inventory. Tools can be repaired; see [[Item repair]].

== Obtaining ==

=== Mob loot ===
{{main|Drops#Mob drops|title1=Drops}}
Some tools can be obtained by killing mobs that carry the equipment.

=== Crafting ===
Most tools can be obtained through crafting.
{{:Crafting/Tools}}

=== Upgrading ===
[[Netherite]] tools can be obtained only through upgrading.

{{Smithing
|head=1
|Netherite Upgrade
|Diamond Pickaxe; Diamond Axe; Diamond Shovel; Diamond Hoe
|Netherite Ingot
|Netherite Pickaxe; Netherite Axe; Netherite Shovel; Netherite Hoe
}}

== Usage ==
=== Best tools ===
{{main|Breaking#Best tools|title1=Breaking}}

Many blocks have a preferred tool to break them. Some blocks can be broken only with certain tools. The tool's material also affects how fast a block is mined. Materials from worst to best in terms of mining speed are wooden, stone, iron, diamond, netherite, gold.

=== Item durability ===
{{main|Durability}}

Different tools have different amounts of durability. Some uses require more durability to be used than others. A tool's durability is also affected by its material. Materials from worst to best in terms of durability are gold, wooden, stone, iron, diamond, netherite.

Some tools are not block-breaking tools: This includes bows, fishing rods, carrots on sticks, flint & steel, and buckets. Such tools are no better than bare fists at breaking blocks, but they do not take damage from doing so—they take damage from being used in their own intended manners.

=== Item enchantability ===
Materials from worst to best in terms of [[enchantability]] are stone, diamond, iron, wooden/netherite, gold.

=== Smelting ===
{{main|Smelting}}

Iron or golden tools can be smelted into [[nugget]]s.
{{Smelting|showname=1|head=1|Any iron tools|Iron Nugget|0,1}}
{{Smelting|showname=1|foot=1|Any golden tools|Gold Nugget|0,1}}

; Fuel
* Wooden tools can be used as a fuel in [[furnace]]s, smelting 1 item per tool.
* A [[fishing rod]] can be used as fuel in [[furnace]]s, smelting 1.5{{only|java|short=1}}/1{{only|bedrock|short=1}} items per fishing rod.

== History ==
{{info needed section|earlier Java Edition history between Indev and 1.3.1|section=10}}
{{History|java indev}}
{{History||0.31|snap=20091231-2|Added iron shovels.}}
{{History|||snap=20100110|Added iron axes and pickaxes.}}
{{History|||snap=20100128|Added wooden, stone, and diamond tools.}}
{{History|||snap=20100129|Added crafting recipes for wooden, stone, iron, and diamond tools.}}
{{History|||snap=20100130|Added golden tools.}}
{{History|||snap=20100131|A [[Tiers|tier system]] for wooden, stone, iron, diamond, and gold tools is added. Each tier has a different mining speed multiplier and durability.}}
{{History|||snap=20100201-2|Tools are now required to break blocks and ores.}}
{{history|java}}
{{History||1.0.0|snap=RC1|Tools now make a breaking sound and have a breaking animation.
|All tools now also have breaking animation.}}
{{History|||snap=RC2|Tools no longer break quickly after loading a world that was saved in RC1.}}
{{History||1.3.1|snap=12w17a|Tools now have infinite [[durability]] in [[Creative]] mode.}}
{{history|||snap=12w18a|Wooden tools became able to be used as [[fuel]] for [[furnace]]s in case players didn't want to repair them or finish using them.}}
{{History|||snap=12w24a|Breaking a block that can be [[instant mining|instantly mined]] by hand ([[tall grass]], [[torch]], etc.) while holding a block-breaking tool no longer reduces the tool's [[durability]].}}
{{history||1.6.1|snap=13w21a|Instead of replacing the barehanded damage ({{hp|1}}), pickaxes, shovels, axes and swords now add their damage onto the barehanded damage.}}
{{History||1.11.1|snap=16w50a|Golden and iron tools now smelt down into one of their respective nuggets.}}
{{History||1.14|snap=18w48a|Tools cannot be repaired by crafting.}}
{{History||1.14.3|snap=Pre-Release 3|Tools can be once again be repaired by crafting.}}
{{History||1.16.2|snap=20w29a|Tools have a new arrange in the Creative inventory.}}
{{History||1.20<br>(Experimental)|link=1.19.4|snap=23w04a|Upgrading diamond tools to netherite tools now requires the netherite upgrade [[smithing template]].}}
{{History|||snap=23w07a|Added brushes.}}

{{History|pocket alpha}}
{{History||v0.2.0|Added stone tools and shears.}}
{{History||v0.3.0|Added wooden tools.}}
{{History||v0.3.2|Added iron, diamond, and golden tools.}}
{{History||v0.3.3|Added bows.}}
{{History||v0.4.0|Added flint and steel and all hoe types.}}
{{History||v0.7.0|Added buckets.}}
{{History||v0.7.4|Flint and steel now ignite creepers.}}
{{History||v0.8.0|snap=build 1|Added flint and steel to the Creative inventory.}}
{{History|||snap=build 3|Added shears to the Creative inventory.}}
{{History||v0.11.0|snap=build 1|Added fishing rod.}}
{{History||v0.15.0|snap=build 1|Added carrot on a stick and leads.}}
{{History|pocket}}
{{History||1.1.0|snap=alpha 1.1.0.0|Golden and iron tools now smelt down into one of their respective nuggets.}}
{{History|console}}
{{History||xbox=TU53|xbone=CU43|ps=1.49|wiiu=Patch 23|switch=1.0.3|Golden and iron tools now smelt down into one of their respective nuggets.}}
{{History|foot}}

== Issues ==

{{issue list}}

== Trivia ==
* Gold tools are actually ranked as superior to diamond tools on the [[Legacy Console Edition]]'s crafting screen.
* Wooden tools can be burned in a furnace regardless of its durability; this means the player can burn a wooden tool that has only 1 use left.

== See also ==
* [[Item Repair]]
* [[Breaking]]
* [[Weapon]]

{{Items}}

[[Category:Tools|*]]

[[cs:Nástroje]]
[[de:Werkzeug]]
[[es:Herramientas]]
[[fr:Outils]]
[[hu:Eszközök]]
[[it:Attrezzi]]
[[ja:道具]]
[[ko:도구]]
[[nl:Gereedschap]]
[[pl:Narzędzia]]
[[pt:Ferramentas]]
[[ru:Инструменты]]
[[tr:Alet]]
[[zh:工具]]</li><li>[[Glass Bottle|Glass Bottle]]<br/>{{about|the empty bottle||Bottle}}

{{Item
| image = Glass Bottle.png
| renewable = Yes
| stackable = Yes (64)
}}

A '''glass bottle''' is an [[item]] that can hold [[water]], [[potion]]s, [[Honey Bottle|honey]], or [[dragon's breath]].

== Obtaining ==

Glass bottles can be obtained by crafting, drinking from bottles, [[fishing]], or from [[witch]] drops.

=== Crafting ===

{{Crafting
|A2= Glass
|C2= Glass
|B3= Glass
|Output= Glass Bottle,3
|type= Brewing
}}

=== Drinking ===

Drinking a [[potion]] or [[Honey Bottle|honey bottle]] returns the empty glass bottle. Throwing a splash potion or a lingering potion does not return a glass bottle, but brewing a lingering potion gives back a glass bottle.

=== Mob loot ===

[[Witch]]es have a chance of dropping 0–6 glass bottles upon death. This is increased by 3 per level of [[Looting]], for a maximum of 0–15 glass bottles.

=== Mud ===

{{control|Using}} a [[water bottle]], [[splash water bottle]] or [[lingering water bottle]] on [[dirt]], [[coarse dirt]] or [[rooted dirt]] will transforming it into a [[mud]] block, at the same time leaving the player with an empty glass bottle.

=== Cauldrons ===

{{control|Using}} a water bottle (or, {{in|bedrock}}, a potion, splash potion, or lingering potion) on a [[cauldron]] that is not yet full adds that liquid to the cauldron, leaving the player with an empty glass bottle.

== Usage ==

Glass bottles can be filled to make [[water bottle]]s, which can then be used to [[brew]] items with a [[brewing stand]]. Glass bottles are also used to hold the resulting [[potion]].

=== Collecting liquids ===

==== Water ====
A bottle may be filled with water by holding it in the hand and {{control|using}} it on a [[water]] source block or a [[cauldron]] that has water in it. It can also be filled using a waterlogged block.{{only|java}}<ref>{{bug|MCPE-83420}}</ref>

Also, a bottle may be filled by powering a [[dispenser]] containing a bottle and pointed at a water source block. This does not work with cauldrons.<ref>{{bug|MC-165196|||Invalid}}</ref>

If filled via a water source, the water is unaffected. If filled via a cauldron, {{frac|1|3}} of the water in the cauldron is removed. Therefore, using a cauldron to fill water bottles is inefficient, except in [[the Nether]] where it is normally the only way to fill bottles.

==== Potion ====
{{IN|bedrock}}, a bottle may be filled with potion by {{control|using}} it on a [[cauldron]] containing potion. When the bottle is filled, {{frac|1|3}} of the cauldron's potion is removed.

==== Honey ====
If a [[beehive|bee nest]] or [[beehive]] is full, the player can {{control|use}} a glass bottle on the block, or may power a [[dispenser]] that contains a bottle and is pointed at the block, which empties the block and creates a [[honey bottle]]. Honey bottles can also be emptied by using them in crafting recipes (such as [[sugar]] or [[honey block]]). However, a lingering potion use on tipped arrow recipe does not give the bottle back.

==== Dragon's breath ====
{{control|Using}} a glass bottle in clouds emitted when the [[ender dragon]] breathes or shoots a [[dragon fireball]] fills the bottle with [[dragon's breath]].

When put 2 or more dragon's breath in the brewing stand, after the brewing process, a glass bottle will drop as an [[Item (entity)|entity]]. However, if put only 1 dragon's breath in the brewing stand, after the brewing process, the glass bottle is consumed and cannot be retrieved.<ref>{{bug|MC-259583}}</ref>

=== Trading ===

Expert-level cleric [[villager]]s have a 50% chance to buy 9 glass bottles for one [[emerald]] as part of their trade.{{only|bedrock}}

Expert-level cleric villagers have a {{frac|2|3}} chance to buy 9 glass bottles for one emerald.{{only|java}}

=== Crafting ingredients ===
{{Crafting usage|Glass Bottle}}

== Sounds ==
{{edition|java}}:
{{Sound table
|rowspan=2
|sound=Bottle fill water1.ogg
|sound2=Bottle fill water2.ogg
|sound3=Bottle fill water3.ogg
|sound4=Bottle fill water4.ogg
|subtitle=Bottle fills
|source=block
|description=When a bottle is filled with a liquid from a cauldron, or honey from a bee nest or beehive
|id=item.bottle.fill
|translationkey=subtitles.item.bottle.fill
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|subtitle=Bottle fills
|source=neutral
|description=When a bottle is filled with water from a water source
|id=item.bottle.fill
|translationkey=subtitles.item.bottle.fill
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|sound=Bottle empty1.ogg
|sound2=Bottle empty2.ogg
|subtitle=Bottle empties
|source=block
|description=When a water bottle is emptied
|id=item.bottle.empty
|translationkey=subtitles.item.bottle.empty
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|sound=Bottle fill dragon breath1.ogg
|sound2=Bottle fill dragon breath2.ogg
|subtitle=Bottle fills
|source=neutral
|description=When a bottle is filled with dragon's breath
|id=item.bottle.fill_dragonbreath
|translationkey=subtitles.item.bottle.fill
|volume=1.0
|pitch=1.0
|distance=16
|foot=1}}

{{edition|java}}:
{{Sound table
|type=bedrock
|rowspan=4
|sound=Water Splash Old.ogg
|source=block
|description=When water from a bottle is placed in a cauldron<wbr><ref group=sound name=potionsplash>{{Bug|MCPE-174867}}</ref>
|id=cauldron.fillwater
|volume=0.1
|pitch=1.0}}
{{Sound table
|source=block
|description=When water from a bottle is taken from a cauldron<wbr><ref group=sound name=potionsplash/>
|id=cauldron.takewater
|volume=0.1
|pitch=1.0}}
{{Sound table
|source=block
|description=When a bottle is filled with a potion from a cauldron<wbr><ref group=sound name=potionsplash/>
|id=cauldron.fillpotion
|volume=0.1
|pitch=1.0}}
{{Sound table
|source=block
|description=When a potion bottle is emptied into a cauldron<wbr><ref group=sound name=potionsplash/>
|id=cauldron.takepotion
|volume=0.1
|pitch=1.0}}
{{Sound table
|sound=Bottle empty1.ogg
|sound2=Bottle empty2.ogg
|source=sound<!--bottle-->
|description=When a bottle is emptied<wbr>{{Upcoming|BE 1.20.40}}
|id=bottle.empty
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Bottle fill water1.ogg
|sound2=Bottle fill water2.ogg
|sound3=Bottle fill water3.ogg
|sound4=Bottle fill water4.ogg
|source=sound<!--bottle-->
|description=When a bottle is filled<wbr>{{Upcoming|BE 1.20.40}}
|id=bottle.fill
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Fill water bucket1.ogg
|sound2=Fill water bucket2.ogg
|sound3=Fill water bucket3.ogg
|source=block
|description=When a bottle is filled with honey from a bee nest or beehive<wbr><ref group=sound>{{Bug|MCPE-53881}}</ref>
|id=bucket.fill_water
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Bottle fill dragon breath1.ogg
|sound2=Bottle fill dragon breath2.ogg
|source=sound
|description=When a bottle is filled with dragon's breath
|id=bottle.dragonbreath
|volume=0.7<wbr>{{Until|BE 1.20.40}}<br>1.0<wbr>{{Upcoming|BE 1.20.40}}
|pitch=1.0
|foot=1}}

== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Glass Bottle
|spritetype=item
|nameid=glass_bottle
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Glass Bottle
|spritetype=item
|id=427
|nameid=glass_bottle
|form=item
|foot=1}}

== Achievements ==

{{Load achievements|You Need a Mint;Local Brewery;Bee Our guest}}

== Advancements ==
{{load advancements|Local Brewery;You Need a Mint;Bee Our Guest}}

== History ==
{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease 2|[[File:Glass Bottle JE1 BE1.png|32px]] Added glass bottles.}}
{{History|||snap=Beta 1.9 Prerelease 3|[[File:Water Bottle JE1 BE1.png|32px]] Glass bottles have been given their sole function of picking up [[water]] for the [[brewing]] of [[potion]]s.}}
{{History||1.4.2|snap=12w38b|[[Witch]]es now have a chance of [[drops|dropping]] glass bottles upon [[death]].}}
{{history||1.9|snap=15w33a|[[File:Dragon's Breath JE1 BE1.png|32px]] Glass bottles can now be used to obtain [[dragon's breath]].}}
{{history|||snap=15w43a|A glass bottle can be found in the [[brewing stand]] in an [[igloo]] basement.}}
{{history|||snap=15w43c|The glass bottle has been removed from igloo basements.}}
{{History|||snap=15w50a|Added [[sound]]s: <code>item.bottle.fill</code> and <code>item.bottle.fill_dragonbreath</code>.}}
{{History||1.13|snap=17w47a|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 374.}}
{{History||1.14|snap=18w43a|[[File:Glass Bottle JE2 BE2.png|32px]] [[File:Water Bottle JE2 BE2.png|32px]] [[File:Dragon's Breath JE2 BE2.png|32px]] The textures of glass bottles, [[water bottle]]s and [[dragon's breath]] have been changed.}}
{{History|||snap=19w11a|Cleric [[villager]]s now [[trading|buy]] glass bottles.}}
{{History||1.15|snap=19w34a|[[File:Honey Bottle JE1.png|32px]] Glass bottles can now be used to collect [[Honey Bottle|honey]].
|[[Dispenser]]s may now use glass bottles to collect [[water]] and honey.}}
{{History|||snap=19w46a|Using glass bottles to collect honey now unlocks the [[Bee Our Guest]] advancement.}}
{{History||1.19|snap=22w11a|Converting [[dirt]], [[coarse dirt]] or [[rooted dirt]] into [[mud]] using a [[water bottle]], [[splash water bottle]] or [[lingering water bottle]] now leaves the player with an empty glass bottle.}}

{{History|pocket alpha}}
{{History||v0.12.1|snap=build 1|[[File:Glass Bottle JE1 BE1.png|32px]] Added glass bottles.}}
{{History||v0.14.0|snap=build 1|Glass bottles can now be used to empty [[cauldron]]s filled with [[water]] or [[potion]]s.
|Glass bottles can now be dropped by [[witch]]es.
|Potions and [[splash potion]]s can now be used to fill cauldrons, which turns them into glass bottles.}}
{{History|pocket}}
{{History||1.0.0|snap=alpha 0.17.0.1|[[File:Dragon's Breath JE1 BE1.png|32px]] Glass bottles can now be used to obtain [[dragon's breath]].
|[[Lingering potion]]s can now be used to fill [[cauldron]]s, which turns them into glass bottles.}}
{{History|bedrock}}
{{History||1.10.0|snap=beta 1.10.0.3|[[File:Glass Bottle JE2 BE2.png|32px]] The texture of glass bottles has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.4|Glass bottles can now be [[trading|sold]] to cleric [[villager]]s.}}
{{History||1.14.0|snap=beta 1.14.0.1|[[File:Honey Bottle BE1.png|32px]] Glass bottles can now be used to collect [[Honey Bottle|honey]].
|[[Dispenser]]s may now use glass bottles to collect [[water]] and honey.}}

{{History|console}}
{{History||xbox=TU7|xbone=CU1|ps=1.0|wiiu=Patch 1|[[File:Glass Bottle JE1 BE1.png|32px]] Added glass bottles.}}
{{History|PS4}}
{{History||1.90|[[File:Glass Bottle JE2 BE2.png|32px]] The texture of glass bottles has been changed.}}

{{History|new 3ds}}
{{History||0.1.0|[[File:Glass Bottle JE1 BE1.png|32px]] Added glass bottles.}}
{{History||1.7.10|[[File:Dragon's Breath JE1 BE1.png|32px]]  Glass bottles can now be used to obtain [[dragon's breath]].}}
{{history|foot}}

== Issues ==
{{issue list}}

==References==
{{Reflist}}

{{Items}}

[[cs:Lahvička]]
[[de:Glasflasche]]
[[es:Frasco de cristal]]
[[fr:Fiole]]
[[hu:Üvegpalack]]
[[it:Ampolla]]
[[ja:ガラス瓶]]
[[ko:유리병]]
[[nl:Glazen fles]]
[[pl:Szklana butelka]]
[[pt:Frasco]]
[[ru:Колба]]
[[zh:玻璃瓶]]
[[Category:Renewable resources]]</li></ul>
18w01aAdded a data generator to both the Minecraft client and the default multiplayer software.
1.14
{{Extension DPL}}<ul><li>[[Shears|Shears]]<br/>{{Item
| image = Shears.png
| rarity = Common
| renewable = Yes
| durability = 238
| stackable = No
}}

'''Shears''' are tools required to obtain some organic blocks or otherwise mine them faster as well as to shear certain entities and blocks.

==Obtaining==

===Crafting===

{{Crafting
|head=1
|showdescription=1
|B2= Iron Ingot
|A3= Iron Ingot
|Output= Shears
|type= Tool
}}
{{crafting
|foot=1
|ignoreusage=1
|Damaged Shears
|Damaged Shears
|Output= Shears
|description= The durability of the two shears is added together, plus an extra 5% durability.
|type= Tool
}}
Despite using [[Iron Ingot|iron]] in its crafting recipe, shears cannot be smelted into [[iron nugget]]s.<ref>{{bug|MC-111738}}</ref>

===Trading===

Novice-level Shepherd [[villager]]s have a 40% chance to sell shears for 2 [[emerald]]s in Java Edition. This trade is always offered in Bedrock Edition.

===Chest loot===

{{LootChestItem|shears}}

==Usage==

===Shearing===
Shears lose 1 [[durability]] when used to shear something.

Shears can be {{Control|use|text=used}} on a [[sheep]] to remove its coat and drop 1–3 [[wool]] of the corresponding color. The same sheep can be sheared again after it eats from a [[grass block]] to regenerate its coat.

Shearing a [[mooshroom]] drops 5 [[mushroom]]s of the corresponding color and irreversibly turns it into a normal [[cow]].

Shearing a [[snow golem]] irreversibly removes its pumpkin, dropping it and revealing its face.

Shearing either a [[beehive]] or [[bee nest]] that is full of honey makes it drop 3 [[honeycomb]]s and resets it to honey level 0. The same beehive or bee nest can be sheared again if it is able to reach full honey again. If sheared by hand without a [[campfire]] below the hive or nest all bees within will exit and all nearby bees will attack the offending player. 

[[Dispenser]]s can use shears in any of the above listed ways, interacting with any valid block or entity in front of the dispenser's face. This decreases the shears' [[durability]]. A dispenser shearing a beehive or bee nest will not anger bees or cause them to leave even if there is not a campfire below it.

Shearing a [[pumpkin]] turns it into a [[carved pumpkin]], dropping 4 [[pumpkin seeds]].

{{IN|java}}, shearing the tip of [[cave vines]], [[kelp]], [[weeping vines]], or [[twisting vines]] sets its age value to 25 and stops further growth.

===Breaking blocks===
Shears use 1 [[durability]] when is used to break any block, even if it [[instant mining|breaks instantly]] by hand.

Shears can be used to harvest [[cobweb|cobwebs]], [[leaves]], [[grass|grass, tall grass]], [[seagrass|seagrass, tall seagrass]], [[fern|ferns, large fern]]s, [[dead bush]]es, [[nether sprouts]], [[vines]], [[glow lichen]] or [[hanging roots]] and obtain them in item form. They can also be used to break [[tripwire]] connected to a [[tripwire hook]] without activating it.

When shears are used to break [[Weeping Vines|weeping vines]] or [[Twisting Vines|twisting vines]] they are guaranteed to drop in item form instead of the usual 33% chance. This only applies to vines directly broken by shears and not vines that are broken due to the destruction of their supporting vines.

The following table shows information about blocks that can be broken with shears. Colors indicate what gets dropped when the block is broken:

*White: The original block.
*Blue: The block's normal drop (i.e. string, sticks, seeds, saplings, apples).
*Red: Nothing.

{| class="wikitable" style="text-align:center" data-description="Blocks broken with shears"
!
!No shears breaking time
!Shears breaking time
|-
! style="text-align:left" |{{BlockLink|Cobweb}}
| {{tc|no|20 s}}<ref group="note">Breaking cobwebs with a sword is as fast as breaking with shears, and yields string. This costs double durability.</ref>
|0.4 s
|-
! style="text-align:left" |{{BlockLink|Dead Bush}}
| {{tc|planned|0 s}}
|0 s
|-
! style="text-align:left" |{{BlockLink|id=fern|Grass|Fern}}
| {{tc|planned|0 s}}
|0 s
|-
! style="text-align:left" |{{BlockLink|Grass}}
| {{tc|planned|0 s}}
| 0 s
|-
! style="text-align:left" |{{BlockLink|Nether Sprouts}}
| {{tc|no|0 s}}<ref group="note">{{IN|bedrock}}, the item drops when breaking it with fists.</ref>
|0 s
|-
! style="text-align:left" |{{BlockLink|Leaves}}
| {{tc|planned|0.35 s}}
|0.05 s
|-
! style="text-align:left" |{{BlockLink|id=tripwire|String#Tripwire|Tripwire}}
|0 s
|0 s<ref group="note">Using shears does not trigger a redstone pulse.</ref>
|-
! style="text-align:left" |{{BlockLink|Vines}}
| {{tc|no|0.35 s}}
|0.35 s
|-
! style="text-align:left" |{{BlockLink|Wool}}
|1.25 s
|0.25 s
|-
! style="text-align:left" |{{BlockLink|Seagrass}}
| {{tc|no|0 s}}
|0 s
|-
! style="text-align:left" | {{BlockLink|Glow Lichen}}
| {{tc|no|0.3 s}}
|0.3 s
|-
! style="text-align:left" |{{BlockLink|Hanging Roots}}
| {{tc|no|0 s}}
|0 s
|-
! style="text-align:left" |{{BlockSprite|Twisting Vines Plant}}{{BlockLink|Twisting Vines}}<br> {{BlockSprite|Weeping Vines Plant}}{{BlockLink|Weeping Vines}}
|0 s
|0 s<ref group="note">Using shears will increase the chance of dropping from 33% to 100%.</ref>
|}

{{notelist}}

===Enchantments===

Shears can receive the following [[Enchanting|enchantments]]:

{| class="wikitable col-2-center col-3-right"
|+
!Name
! Max Level
![[Enchanting|Method]]
|-
|[[Efficiency]]
|V
|{{Inventory slot|Anvil}}
|-
|[[Unbreaking]]
| III
|{{Inventory slot|Anvil}}
|-
|[[Mending]]
|I
|{{Inventory slot|Anvil}}
|-
|[[Curse of Vanishing]]
|I
|{{Inventory slot|Anvil}}
|-
|[[Silk Touch]]{{only|be|short=1}}
|I
|{{Inventory slot|Anvil}}
|}

{{notelist}}

== Sounds ==
{{edition|java}}:
{{Sound table
|rowspan=4
|sound=Shear.ogg
|subtitle=Shears click
|source=player
|description=When a mooshroom is sheared
|id=entity.mooshroom.shear
|translationkey=subtitles.item.shears.shear
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|subtitle=Shears click
|source=player
|description=When a sheep is sheared
|id=entity.sheep.shear
|translationkey=subtitles.item.shears.shear
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|subtitle=Shears click
|source=player
|description=When a snow golem is sheared
|id=entity.snow_golem.shear
|translationkey=subtitles.item.shears.shear
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|subtitle=Plant cropped
|source=block
|description=When a growing plant is cropped
|id=block.growing_plant.crop
|translationkey=subtitles.block.growing_plant.crop
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|sound=Beehive shear.ogg
|source=block
|subtitle=Shears scrape
|description=When honeycombs are harvested from a beehive
|id=block.beehive.shear
|translationkey=subtitles.block.beehive.shear
|volume=0.8
|pitch=1.0/0.8/0.9
|distance=16}}
{{Sound table
|sound=Pumpkin carve1.ogg
|sound2=Pumpkin carve2.ogg
|source=block
|subtitle=Shears carve
|description=When a pumpkin is carved
|id=block.pumpkin.carve
|translationkey=subtitles.block.pumpkin.carve
|volume=1.0
|pitch=1.0
|distance=16}}
{{Sound table
|sound=Random break.ogg
|subtitle=Item breaks
|source=player
|description=When a pair of shears' durability is exhausted
|id=entity.item.break
|translationkey=subtitles.entity.item.break
|volume=0.8
|pitch=0.8-1.2
|distance=16
|foot=1}}

{{edition|bedrock}}:<br>
Pumpkins do not have carve sounds.
{{Sound table
|type=bedrock
|sound=Shear.ogg
|source=player
|description=When something is sheared
|id=mob.sheep.shear
|volume=1.0
|pitch=1.0}}
{{Sound table
|sound=Beehive shear.ogg
|source=block
|description=When honeycombs are harvested from a beehive
|id=block.beehive.shear
|volume=0.8
|pitch=0.8-1.0}}
{{Sound table
|sound=Random break.ogg
|source=player
|description=When a pair of shears' durability is exhausted
|id=random.break
|volume=1.0
|pitch=0.9
|foot=1}}

==Data values==
===ID===
{{edition|java}}:
{{ID table
|edition=java
|showforms=y
|generatetranslationkeys=y
|displayname=Shears
|spritetype=item
|nameid=shears
|form=item
|foot=1}}

{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showforms=y
|notshowbeitemforms=y
|generatetranslationkeys=y
|displayname=Shears
|spritetype=item
|nameid=shears
|id=421
|form=item
|foot=1}}

==Achievements==

{{load achievements|Have a Shearful Day}}<div style="text-align:center"></div>

==History==
{{History||June 3, 2011|link=https://twitter.com/jeb_/status/76570646074765312|Shears were first mentioned by [[Jeb]] on [[wikipedia:Twitter|Twitter]]. The tweet revealing Jeb's work on shears was written in Swedish (''Jag jobbar på shears nu''), which translates to "I'm working on shears now".}}
{{History||June 7, 2011|link=https://twitter.com/jeb_/status/78154891637436416|Jeb tweets about how shears were originally planned as a way to defuse [[TNT]], but he dropped this shortly after deciding TNT would detonate only with [[redstone]] or [[fire]].}}
{{History|java beta}}
{{History||1.7|[[File:Shears JE1 BE1.png|32px]] Added shears.
|Before [[Beta 1.7]], [[sheep]] would drop 1-3 [[wool]] blocks at most when hit, but shears can harvest up to 4 wool blocks per sheep.}}
{{History||1.8|snap=Pre-release|Shears can now be used to harvest a [[fern]], [[vines]] and [[grass]].}}
{{History|java}}
{{History||1.0.0|snap=Beta 1.9 Prerelease|Shears now harvest [[red mushroom]]s from a [[mooshroom]] and turn it back into a normal [[cow]].}}
{{History||1.1|snap=11w49a|[[Sheep]] now drop only 1-3 wool blocks when sheared, but they can also regrow their wool by eating [[grass block|grass]], which is part of a plan to have [[animal]]s stay in the game longer.<ref>{{Tweet|jeb|76647002317930496}}</ref>}}
{{History||1.2.1|snap=12w05a|Shears can now be used to harvest [[dead bush]]es.}}
{{History|||snap=12w06a|Shears are now [[renewable]], due to [[zombie]]s occassionally dropping iron ingots.}}
{{History||1.3.1|snap=12w21a|Shears can now be [[trading|bought]] from farmer [[villager]]s for 3 [[emerald]]s each.}}
{{History|||snap=12w22a|Shears can now be used to break [[tripwire]] string and not set it off.}}
{{History||1.4.2|snap=12w38a|Added a [[sound]] when using shears on [[sheep]].}}
{{History||1.4.6|snap=12w50a|Shears can now be [[enchanting|enchanted]].}}
{{History||1.8|snap=14w02a|[[Trading]] has been changed: Shepherd [[villager]]s now [[trading|sell]] shears for 3–4 [[emerald]]s each. 
|Farmers no longer trade shears.}}
{{History|||snap=pre1|Shears now lose [[item durability|durability]] when breaking [[wool]] blocks. In previous versions, shears would take [[item durability|durability]] [[damage]] only when destroyed or when breaking [[tall grass]] or [[leaves]], the damage remaining the same for all other [[block]]s.<ref>{{bug|MC-5313}}</ref>}}
{{History||1.9|snap=15w34a|Shears may now be used in a crafting grid to zoom in [[map]]s.}}
{{History|||snap=15w45a|Shears no longer zoom in maps.}}
{{History|||snap=15w47b|Shears can no longer be enchanted with [[Silk Touch]].
|Shears now lose durability when used to break any block (formerly lost durability only from [[leaves]], [[web]], [[grass]], [[vines]], [[tripwire]] and [[wool]]).}}
{{History|||snap=15w47c|Shears now harvest [[cobweb]] without requiring [[Silk Touch]].}}
{{History|||snap=15w49a|[[Snow golem]]'s [[pumpkin]] can now be removed with shears.}}
{{History||1.13|snap=17w47a|When shears are {{control|used}} on an un-carved [[pumpkin]], it now turns into a carved pumpkin and drops 4 [[pumpkin seeds]].
|Prior to [[1.13/Flattening|''The Flattening'']], this [[item]]'s numeral ID was 359.}}
{{History||1.14|snap=18w43a|Shears placed in a [[dispenser]] can now shear [[sheep]].
|[[File:Shears JE2 BE2.png|32px]] The texture of shears has been changed.}}
{{History|||snap=18w49a|Shears can now be found in [[chest]]s in [[village]] shepherd houses.}}
{{History||1.15|snap=19w34a|Shears can now be used on [[bee nest]]s and [[beehive]]s to harvest [[honeycomb]].}}
{{History||1.16|snap=20w15a|Shears placed in a dispenser can now shear [[mooshrooms]] and [[snow golem]]s.}}
{{History||1.16.2|snap=pre1|Shears are now required in order to pick up [[roots]].}}
{{History||1.16.2|snap=pre2|Shears are no longer required to pick up [[roots]].}}
{{History||1.17|snap=?|Shears are now required in order to pick up [[hanging roots]].}}
{{History||1.18|snap=21w37a|Shears can now stop [[cave vines]], [[kelp]], [[weeping vines]], and [[twisting vines]] from aging.}}
{{History||1.19|snap=22w11a|Shears are now required in order to pick up [[mangrove leaves]].}}

{{History|pocket alpha}}
{{History||v0.2.0|[[File:Shears JE1 BE1.png|32px]] Added shears.}}
{{History||v0.3.2|Survival [[player]]s no longer start out with infinite durability shears in the [[inventory]].}}
{{History||v0.4.0|Removed shears from the creative inventory.}}
{{History||v0.8.0|snap=build 3|Re-added shears to [[creative]] mode.}}
{{History||v0.9.0|snap=build 1|Shears can now be used to transform [[mooshroom]]s into [[cow]]s.}}
{{History||v0.12.1|snap=build 3|Shearing a [[snow golem]] now removes its [[pumpkin]].
|Shears can now be [[enchanting|enchanted]] in an [[anvil]].}}
{{History||v0.13.0|snap=build 1|Shears can now be used to break [[tripwire]] string without triggering it.}}
{{History||v0.15.0|snap=build 1|Shears now lose durability when used to break any [[block]].}}
{{History|pocket}}
{{History||1.0.4|snap=alpha 1.0.4.0|Shears can now be [[trading|bought]] from shepherd [[villager]]s.}}
{{History||1.1.0|snap=alpha 1.1.0.0|Breaking a [[melon|melon block]] with shears now always drop 9 [[melon slice|melons]].}}
{{History|bedrock}}
{{History||1.4.0|snap=beta 1.2.13.8|Shears can now be used to turn un-carved [[pumpkin]]s into [[carved pumpkin]] and spit out 4 [[pumpkin seeds]].}}
{{History||?|Shears now harvest [[cobweb]] without requiring [[Silk Touch]].}} 
{{History||1.10.0|snap=beta 1.10.0.3|Shears placed in a [[dispenser]] can now shear [[sheep]].
|[[File:Shears JE2 BE2.png|32px]] The texture of shears has been changed.}}
{{History||1.11.0|snap=beta 1.11.0.1|Shears can now be found in [[village]] shepherd houses.}}
{{History|||snap=beta 1.11.0.4|Shears [[trading|sold]] by shepherd [[villager]]s now cost only 2 [[emerald]]s.}}
{{History||1.14.0|snap=beta 1.14.0.1|Shears can now be used on [[bee nest]]s and [[beehive]]s to harvest [[honeycomb]].}}

{{History|console}}
{{History||xbox=TU3|xbone=CU1|ps=1.0|wiiu=Patch 1|switch=1.0.1|[[File:Shears JE1 BE1.png|32px]] Added shears.}}
{{History||xbox=TU69|xbone=none|ps=1.76|wiiu=Patch 38|switch=none|Shears can now be used to turn regular [[pumpkin]]s into [[carved pumpkin]]s.}}
{{History||xbox=none|xbone=none|ps=1.90|wiiu=none|switch=none|[[File:Shears JE2 BE2.png|32px]] The texture of shears has been changed.
|Shears placed in a [[dispenser]] can now shear [[sheep]].}}

{{History|New 3DS}}
{{History||0.1.0|[[File:Shears JE1 BE1.png|32px]] Added shears.}}
{{History|foot}}

==Issues==
{{issue list}}

==Gallery==

<gallery>
File:Enchanted Shears.gif|An enchanted pair of shears.
</gallery>

==References==
{{reflist}}

==External links==
*[https://www.minecraft.net/en-us/article/taking-inventory--shears Taking Inventory: Shears] – Minecraft.net on November 20, 2019

{{Items}}

[[cs:Nůžky]]
[[de:Schere]]
[[es:Tijeras]]
[[fr:Cisailles]]
[[hu:Metszőolló]]
[[it:Cesoie]]
[[ja:ハサミ]]
[[ko:가위]]
[[nl:Schaar]]
[[pl:Nożyce]]
[[pt:Tesoura]]
[[ru:Ножницы]]
[[zh:剪刀]]
[[Category:Renewable resources]]</li><li>[[Trial Key|Trial Key]]<br/>{{Item|
|image=Trial Key .webp
|renewable=Yes
|stackable=Yes (64)
}}
{{Stub}}
{{in dev|java|bedrock|1.21|1.21.0}}

A '''Trial Key''' is an item found in [[Trial Chambers]].

Its functionality remained a mystery for a pretty good time, but on the Minecraft Monthly of January 2024, it has been revealed to open vaults, which once opened will drop an item. It's still unknown what will the loot be, but was seen dispensing the following:
Enchanted iron helmet, enchanted iron leggings, enchanted crossbow, enchanted diamond chestplate, iron, gold and diamond horse armour, enchanted golden apple, saddle, enchanted diamond axe, enchanted iron pickaxe and enchanted iron Shovel. 

The trial key can currently be obtained from trial spawners (50%), or from pots and chests (8%).

[[Category:Items]]

[[ja:Trial Key]]
[[lzh:煉管]]</li></ul>
19w08a String tags in SNBT can now be within single quotes ' in addition to double quotes ".[5]

References

External links

  • nbt, a Java library for working with the NBT format.
  • NBT on wiki.vg
  • NBTExplorer, a tool for viewing and editing NBT files.
  • NBT Studio, successor to NBTExplorer that includes additional features like Bedrock support and SNBT.
  • webNBT, an online tool for viewing and editing NBT files.
  • XNBTEdit, XML NBT editor and converter.