Java Edition data values

These data values refer to the different types of blocks and items. They are used in many, many places in Minecraft. Block IDs are used to define blocks placed in the world and inventory items (including items in chests and items dropped in the world). Item IDs are only valid for items. There are also Entity IDs for entities such as mobs and projectiles. Block data further defines blocks placed, describing for example the height of water or the direction a torch points.



Biome IDs
Biomes have been present in Minecraft since the Halloween Update, and the Biome ID is included in the Anvil file format since. The Biome ID for worlds stored in the older McRegion file format is calculated on the fly, which could lead to a discrepancy between the earlier generated world, and the features (such as grass color, snow) based on the calculated biome IDs. The Biome page has more technical details on how color is computed for blocks in various biomes.

Enchantment IDs
Used in and  commands.

Status effects
Used in command.

Data
Up to 4 bits of special data are used for certain block and item types. Blocks that need more than 4 bits of data beyond the block ID use a block entity. Storage differs according to level format.

Saplings
The data value is split in half. The bottom three bits determine the type of sapling (and thus the eventual tree type), according to the following table:

The 0x8 bit functions as the counter. The counter is cleared when a sapling is dropped as an item.

Water and Lava
If bit 0x8 is set, this liquid is "falling" and only spreads downward. At this level, the lower bits are essentially ignored, since this block is then at its highest fluid level.

The lower three bits are the fluid block's level. 0x0 is the highest fluid level (not necessarily filling the block - this depends on the neighboring fluid blocks above each upper corner of the block). Data values increase as the fluid level of the block drops: 0x1 is next highest, 0x2 lower, on through 0x7, the lowest fluid level. Along a line on a flat plane, water drops one level per meter from the source, lava drops one in the nether and two everywhere else.

The stationary versions of each fluid are "stable" and currently not being checked by the engine for further level changes. Oddly the in-code names for stationary water and lava are "water" and "lava" and the regular versions are "flowing_water" and "flowing_lava".

Wood
Block 17

Block 162

Leaves
If bit 0x4 is set, the leaves are permanent and will never decay. This bit is set on player-placed leaf blocks and overrides the meaning of bit 0x8.

If bit 0x8 is set, the leaves will be checked for decay. The bit will be cleared after the check if the leaves do not decay. The bit will be set again whenever a block adjacent to the leaves is changed.

Block 18

Block 161

Wool, Stained Clay, Stained Glass and Carpet
These values specify the color of the wool, stained clay, stained glass and carpet. This data is stored in block metadata for placed wool, stained clay, stained glass or carpet, and as the "damage" for the item in the inventory.


 * Carpet


 * Wool


 * Stained Clay


 * Stained Glass

Slabs
Single slabs can be either "right-side-up" or "upside-down"; this information is stored in the most significant metadata bit 0x8 as follows:
 * 0: Slab is right-side-up, occupying the bottom half of its voxel.
 * 1: Slab is upside-down, occupying the top half of its voxel.

Thus a right-side-up birch wood slab has metadata value 0x2 (binary ), while an upside-down birch slab is represented by metadata 0xA (binary  ).

Double slabs with the high-order bit set render the top texture on all six sides.

The wooden slab in the stone slabs has the properties of stone, and the texture of oak wood planks. They are unavailable in game and can only be obtained through commands.

Double Stone Slabs

 * Block 43


 * Block 181

The full stone, quartz, sandstone, and red sandstone Slabs have a top texture on all sides.

Stone Slabs

 * Block 44


 * Block 182

Double Wooden Slabs

 * Block 125

Wooden Slabs

 * Block 126

Fire
0x0 is a placed or spread fire. Once it reaches 0xF the eternal fire-trick will work since there will be no further updates of the block.

Sandstone
For normal sandstone the bottom has a cracked pattern. The other types of sandstone have bottom faces same as the tops.

Piston
The top bit (0x8) is a status bit that determines whether the piston is pushed out or not. 1 for pushed out, 0 for retracted.

The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing)
 * 0: Down
 * 1: Up
 * 2:
 * 3:
 * 4:
 * 5:

Piston Extension
The top bit (0x8) is a status bit that determines whether the head is sticky or not (note that the Piston Body actually has completely different block types for Sticky and Regular). 1 is sticky, 0 is regular.

The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing).
 * 0: Down
 * 1: Up
 * 2:
 * 3:
 * 4:
 * 5:

Crops
Crops grow from 0x0 to 0x7. Carrots and potatoes (and Beetroot in MCPE) appear to have 4 stages, but actually grow identically to wheat, merely using the same texture for multiple stages. Note: crops with a data value of 0xF have been spotted; the meaning of the top 0x8 bit is unknown.


 * Wheat


 * Carrot


 * Potato


 * Beetroot

Minecraft 1.1 and Earlier
The two least significant bits are the orientation of the door, that is, the corner in which its hinge is positioned:
 * 0x0: corner
 * 0x1: corner
 * 0x2: corner
 * 0x3: corner

The two bits above are flags:
 * 0x8: If this bit is set, this is the top half of a door (else the lower half).
 * 0x4: If this bit is set, the door has swung counterclockwise around its hinge.

For example, the bottom half of a door with its hinge on the corner, which is swung so that it is closed when viewed from the, will have a data value of (3 | 4) = (3 + 4) = 7.

Starting at Minecraft 1.2 (from weekly snapshot 12w06a)


The total data needed to accurately describe a single door tile is now contained in both door tiles, so both data values have to be inspected.

Common to both door tiles, the top bit (0x8) is as follows:
 * 0: The bottom half of the door
 * 1: The top half of the door

Top Sections
 * The least-significant bit (0x1) is as follows, assuming you're facing the same direction the door faces while closed:
 * 0: Hinge is on the right (this is the default for single doors)
 * 1: Hinge is on the left (this will be used for the other half of a double-door combo)
 * The other two bits (0x2 and 0x4) are always zero.
 * The only valid values for a top section, therefore, are 8 (binary 1000) and 9 (binary 1001).
 * The only valid values for a top section, therefore, are 8 (binary 1000) and 9 (binary 1001).
 * The only valid values for a top section, therefore, are 8 (binary 1000) and 9 (binary 1001).

Bottom Sections
 * The second bit (0x4) determines the door's state:
 * 0: Closed
 * 1: Open
 * The bottom two bits determine which direction the door faces (these directions given for which direction the door faces while closed)
 * 0: Facing
 * 1: Facing
 * 2: Facing
 * 3: Facing
 * 3: Facing

Starting at Minecraft ??

 * The second bit for the top half of the door (0x2) determines whether the door is Powered or Unpowered.
 * 0: Door is Unpowered
 * 1: Door is Powered
 * Which means the top section, now uses values 8, 9, 10, and 11.
 * Which means the top section, now uses values 8, 9, 10, and 11.

Ladders, Furnaces, Chests, Trapped Chests

 * Ladder


 * Furnace


 * Chest


 * Trapped Chest

Dispenser and Dropper

 * Dropper


 * Dispenser

Cacti and Sugar Canes

 * Cactus


 * Sugar Canes

Pumpkins and Jack o'Lanterns

 * Pumpkin


 * Jack o'Lantern

Brown and red mushroom blocks
Mushroom blocks consist of the same blocks throughout their structure, the data value of each block decides the texture. The default texture on all sides is porous flesh. The cap texture can be either the brown mushroom or red mushroom texture, the textures for porous and stem sides are identical. Although data values 11-13 are unused they have the same texture as data value 0 as placeholders (to keep people from destroying their maps).

Vines
Determines the face against which the vine is anchored. Note that (except for Top) these are testable as bit flags, unlike most of the other directional data for other block types. Multiple sides can contain vines. The "top" attachment is assumed to be present if data is 0 or there is solid block above.
 * 1:
 * 2:
 * 4:
 * 8:

Nether Wart
Like Crops, the data value is related to the size of the Nether Wart. There are three distinct visual stages to Nether Wart's growth (the associated data values are given):

Brewing Stand
The bottom three bits are bit flags for which bottle slots actually contain bottles.

Cauldron
The data value stores the amount of water kept in the cauldron, in units of glass bottles that can be filled.

End Portal block
The bottom two bits determine which "side" of the whole portal frame this block is a part of. To make the frame activate, each of the portal frame blocks in the pattern must "face" toward the middle. Since the image is near-symmetrical, it is difficult to tell which direction an individual block is actually facing, but if the block isn't facing in that direction and that is the last frame block where the Eye of Ender is placed, the frame won't activate.

Direction vectors for the blocks are the following:


 * 0: To the
 * 1: To the
 * 2: To the
 * 3: To the

0x4 is a bit flag: 0 is an "empty" frame block, 1 is a block with an Eye of Ender inserted.

Flower Pots
For Flower Pot blocks placed from Minecraft version 1.7, the plant contained in the pot is stored in the associated Tile Entity. See Tile Entity Format for details. The absence of a tile entity indicates either an empty Flower Pot, or one whose block was placed prior to version 1.7.

For Flower Pot blocks placed before version 1.7 the plant contained in the pot is indicated by the data value, according to the following table:

Fish
Both raw and cooked fish use the same data values. Note that clownfish and pufferfish cannot be cooked.

Anvil
Anvil data values differ between the item and block.

For an anvil in the world, 0x1 is the bit that determines whether the anvil is orientated in a north-south (0) or a west-east (1) direction. 0x4 and 0x8 are bits which determine whether the anvil is a regular (0x4 & 0x8 = 0), a slightly damaged (0x4 = 1) or a very damaged (0x8 = 1) one. For an anvil in the inventory, the data value is a counter of how damaged it is.

Potions
A glass bottle filled with a potion. Potion type is stored in item's damage value as a 16-bit number. Potion effect, name, and other flags are encoded on bits. Effect duration itself isn't there, but can be calculated from other values.

Current meaning of bits is described below. Note that potion name overlaps with potion effect and tier.

To calculate damage value of potion with desired effect use the following formula: DV = potion_effect + tier_bit + extended_bit + splash_bit for example:
 * potion with "Instant Health" effect has damage value 5 (= 5 + 0 + 0 + 0);
 * potion with extended "Slowness" effect has value 74 (= 10 + 0 + 64 + 0);
 * splash potion with tier II "Strength" effect has value 16425 (= 9 + 32 + 0 + 16384).

To get potion with certain name, use the following formula: DV = potion_name + extended_bit + splash_bit for example:
 * Splash version of "Charming Potion" has damage value 16423 (= 39 + 0 + 16384)

"Potion name" bits
Note: potion with name set to 0 is called "Water Bottle" only if no other bit is set. Otherwise, it is called "Mundane Potion".

Note: potions with an effect and splash potion bit set have additional "Splash " prefix.

"Tier" bit
Note: Fire Resistance, Weakness and Slowness effects have no second tier. Their strength and duration are unaffected by this bit.

Spawn Eggs
Damage values on spawn eggs will cause it to spawn the entity of that id. For example; "/give [playername] spawn_egg 1 50" (a damage value of 50) would cause the spawn egg to create creepers.

Maps
Each map item's damage value corresponds to the map ID saved in each world's NBT data. The map's parameters, such as the scale of the map, its location in the world and what areas are explored are saved in separate .dat files, unlike written books or fireworks which store their additional data directly into the item itself. If a map is cloned they will both share the same damage value and newly explored areas will appear on both instances.

Trivia

 * Using /give command or inventory editors, an item can be spawned with its data value out of normal bounds. This can cause a normal looking item to appear, but will be unusable and unstackable with an identical item that has a different data value. In the case of Wool colors, data values "rotate" when out of bounds. Examples are provided:
 * Example 1 - Stacking: If the player were to type /give  351 1 1, an Ink Sac would be given to the player like normal. However, if the player were to type /give  351 1 -4 afterward, another Ink Sac would be given, but it won't stack with the first Ink Sac, because the two Ink Sacs have different data values, despite the fact that both items appear to be the same thing.
 * Example 2 - Value Defaults: Using the /give command to spawn an item with data values that are out of valid bounds will "default" to the lowest or highest valid data value closest to it. Typing /give  351 1 -23 will spawn an Ink Sac, due to -23 being closest to 0, the lowest possible valid data value for dye, being the Ink Sac. Typing /give  351 1 43 will spawn Bone Meal, because 43 is closest to the dye's highest valid data value, being 15, which is what Bone Meal is.
 * Example 3 - Non-usable: Note that the valid data values for dye are between the numbers 0 and 15. Any type of dye that's spawned with an data value lower than 0 or higher than 15 cannot be used. So if one is using the /give command to spawn a dye with a data value above 15, which would spawn Bone Meal, the said Bone Meal can not be used to mix with other dyes or be used as a quick plant growing agent.
 * Example 4 - Rotation: Data value rotation has been confirmed for Wool, but only the colors seem to rotate. Using a Wool data value of 16 (when the highest is 15) (Note: the wool data value of 16 is shown as nether warts in the inventory, but when placed by the player it becomes white wool) will "circle back" to white wool, which is 0. Using an data value of 18 will circle back to Magenta Wool, because 18 is 3 integers higher than the max of 15, it will circle back to 0, but the extra 3 bumps it to the data value of 2. Using /give to hack in wool with a damage value above 255, however, will result in a flat wool block. Additionally, the color rotation is reversed in the inventory; a wool block with a damage value of 256, for example, looks like black wool in the inventory, but converts to white wool when placed. The highest damage value that can be achieved with /give is 2,147,483,647, which appears as white wool that converts to black wool when placed. A similar effect happens with every block/item with damage values, depending on the block. For example, giving yourself a Wood block with a data value of 10 would give a rotated Birch wood block, because wood uses data values to determine their rotation. As with Wool, giving yourself wood with a data value above 15 will cycle round back to a wood block that appears as the matching wood block with a data value 16 less than itself (for example, a wood block with a data value of 16 appears as Oak Wood but cannot be crafted into planks and will not stack with regular Oak Wood). Wood with a data value above 255 does not appear flat; the data rotation happens normally.

Video
Datenwert Valores de datos Valeurs Adatértékek Valori dei dati 데이터 값 Datawaardes ID pt-br:Valores de Dados Нумерация данных 数据值