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 missiles. Block data further defines blocks placed, describing for example the height of water or the direction a torch points.



Horse Variants
Horse entities have Type and Variant fields that determine the type and look of the horse. All normal horses are of Type 0, donkeys are of Type 1, mules are of Type 2, zombie horses are of Type 3, and skeletal horses are of Type 4. Below is a list of Variant values that determine the variant of Type 0 horses (horse entities of other types seem to ignore the Variant field).

Variant names taken from the names of the texture file they correspond to.

Giving a Type 0 horse entity a Variant value not in this chart will result in a white horse

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.

Enchantment IDs
Used in command.

Status effects
Used in command.

Data
Special data for certain block and item types. 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.

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.

Torches and Redstone Torches

 * 0x0: Standing on the floor
 * 0x1: Pointing
 * 0x2: Pointing
 * 0x3: Pointing
 * 0x4: Pointing

Slabs and Double Slabs
For both slabs and double slabs, the lower three bits of the metadata nybble determine the texture:

Stone Slabs

Wooden 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.

Upside-down slabs were implemented in Weekly Release 12w08a and introduced officially in Minecraft 1.2. Brick slabs and stone brick slabs were added in Beta 1.8.

Wooden slabs as a separate block with wooden properties, rather than a retextured stone slab, was introduced in Weekly Release 12w17a, with each of the four plank types included. The wooden stone slab is still available through inventory hacks or the /give command.

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.

Beds

 * 0x0: Head is pointing
 * 0x1: Head is pointing
 * 0x2: Head is pointing
 * 0x3: Head is pointing
 * 0x4: (bit flag) - When 0, the bed is empty. When 1, the bed is occupied.
 * 0x8: (bit flag) - When 0, the foot of the bed. When 1, the head of the bed.

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:

Stairs
Starting in Minecraft 1.2 (actually weekly 12w08a), the bit at 0x4 is used as follows:
 * 0x0: Ascending
 * 0x1: Ascending
 * 0x2: Ascending
 * 0x3: Ascending
 * 0: Stairs are regular
 * 1: Stairs are upside down

Redstone Wire
0xF is a wire placed right next to a power source (like a redstone torch). The value declines with distance until 0x0, which is a non-powered wire. The direction of the wire is not saved but calculated at runtime.

Crops
Crops grow from 0x0 to 0x7. Carrots and potatoes appear to have 4 stages, but actually grow identically to wheat, merely using the same texture for multiple stages.

Farmland
0x0 is dry land, 0x1-0x8 are increasing levels of wetness. The wetness value depends on how far the block is away from water.

Sign Posts

 * 0x0:
 * 0x1: -
 * 0x2:
 * 0x3: -
 * 0x4:
 * 0x5: -
 * 0x6:
 * 0x7: -
 * 0x8:
 * 0x9: -
 * 0xA:
 * 0xB: -
 * 0xC:
 * 0xD: -
 * 0xE:
 * 0xF: -

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

Rails
Regular Minecart rails use values above 0x5 for the corner pieces. For powered rails, 0x8 is a bit flag; if set, the rail is powered. The bottom three bits have a valid range of 0x0 to 0x5.
 * 0x0: flat track going -
 * 0x1: flat track going -
 * 0x2: track ascending to the
 * 0x3: track ascending to the
 * 0x4: track ascending to the
 * 0x5: track ascending to the

Regular minecart tracks can make a circle from four rails:
 * 0x6: corner (connecting  and )
 * 0x7: corner (connecting  and )
 * 0x8: corner (connecting  and )
 * 0x9: corner (connecting  and )

Ladders, Wall Signs, Furnaces, and Chests

 * 0x2: Facing (for ladders and signs, attached to the  side of a block)
 * 0x3: Facing
 * 0x4: Facing
 * 0x5: Facing

Dispensers, Droppers, and Hoppers
Same as ladders, signs, etc. above and additionally:
 * 0x0: Facing Down
 * 0x1: Facing Up (Or unattached to any container for Hoppers)
 * 0x9: Powered (And updated. Won't refresh until unpowered and updated. Important for texturing.)

Levers

 * 0x8: If this bit is set, the lever has been thrown and is providing power.

Wall levers:
 * 0x1: Facing
 * 0x2: Facing
 * 0x3: Facing
 * 0x4: Facing

Ground levers:
 * 0x5: Lever points when off.
 * 0x6: Lever points when off. (Note that unlike the other types of switch, this version didn't power wires around the block it was sitting on. This bug was fixed in Beta 1.6)

Ceiling levers:
 * 0x7: Lever points when off.
 * 0x0: Lever points when off.

Pressure Plates

 * 0x1: If this bit is set, the plate is pressed.

Buttons

 * 0x8 If this bit is set, the button has been pressed. If this bit is set in a saved level, the button will remain pressed after the level is loaded, until a block update occurs.

Button direction:
 * 0x1: Facing
 * 0x2: Facing
 * 0x3: Facing
 * 0x4: Facing

Snow

 * 0x0: Normal snowfall height
 * 0x7: Full block size height (note that it is not a "full" block)
 * 0x7: Full block size height (note that it is not a "full" block)

Cacti and Sugar Cane
0x0 is a freshly planted cactus or cane. The data value is incremented at random intervals. When it becomes 15, a new cactus or cane block is created on top as long as the total height does not exceed 3, but it can spawn naturally randomly up to 5 blocks high from glitches.

Pumpkins and Jack o'Lanterns

 * 0x0: Facing
 * 0x1: Facing
 * 0x2: Facing
 * 0x3: Facing
 * 0x4: No face

Cake

 * 0x0: 0 pieces eaten
 * 0x1: 1 piece eaten
 * 0x2: 2 pieces eaten
 * 0x3: 3 pieces eaten
 * 0x4: 4 pieces eaten
 * 0x5: 5 pieces eaten

Redstone Comparator
The direction is set in the first 2 least-significant bits:
 * 0: Facing
 * 1: Facing
 * 2: Facing
 * 3: Facing

The mode is set in the 3rd bit:
 * 0: Comparison
 * 1: Subtraction (output torch is lit)

In 1.5 BlockId 150 (active) is used for the power state and the 4th highest bit is not used:

From 1.6 on BlockId 150 is not used and the power state is determined by the 4th highest bit:
 * 0: Comparator is off
 * 1: Comparator is on (two input torches on, and surface shown as lit)

Trapdoors
0x4 is a bit that determines whether or not the trapdoor is swung open. 0 for closed (on the ground), 1 for open (against its connecting wall). 0x8 is a bit that determines whether the trapdoor is on the bottom or top of the block. The remaining two bits describe which wall the trapdoor is attached to:
 * 0x0: Attached to the wall
 * 0x1: Attached to the wall
 * 0x2: Attached to the wall
 * 0x3: Attached to the wall

Huge brown and red mushroom
Huge mushrooms 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.

Pumpkin stem and Melon stem
Pumpkin and melon stems grow from 0x0 to 0x7; however, world editors can force in stems up to 0x15. During each stage of growth a part of their model is revealed. In the last stage a stem can spawn a melon or pumpkin next to it on empty dirt, grass or farmland. As long as this fruit remains the stem will appear bent towards the fruit.

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:

Fence Gates


0x4 is a bit that determines whether the fence gate is open or closed. 1 is open, 0 is closed. The remaining two bits (0x3) describe in which direction the gate is facing. The fence gate swings open away from you. The direction in which you are looking when you stand in front of the open fence gate is the direction in which the gate is facing. The facing-bit directions are:
 * 0: To the
 * 1: To the
 * 2: To the
 * 3: To the

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. The actual bottle contents (and the reagent at the top) are stored in a TileEntity for this block, not in the data field.


 * 0x1: The slot pointing
 * 0x2: The slot pointing
 * 0x4: The slot pointing

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


 * 0: Empty
 * 1: 1/3 filled
 * 2: 2/3 filled
 * 3: Fully 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.

(Using MCPatcher to retexture? This will make more sense: metadata= 0, 1, 2, 3 are for "without eyes". 4, 5, 6, 7 are all "with eyes".)

Cocoas
The top two bits, 0xC, specify the size of the plant. Combination 0xC (both bits set) is not used, and results in a cocoa pod which is larger than the normal largest one, and uses the enderdragon egg texture.
 * 0x0: small
 * 0x4: medium
 * 0x8: large

The bottom two bits define which direction the plant is facing out, i.e. to what side of the tree the plant is attached.
 * 0x0: Facing (i.e., attached to the  side of the tree)
 * 0x1: Facing
 * 0x2: Facing
 * 0x3: Facing

Tripwire Hook

 * 0x4: This bit means the tripwire hook is connected and ready to trip ("middle" position)
 * 0x8: This bit means the tripwire hook is currently activated ("down" position)

An activated hook will normally have a value of 0xC, meaning "connected" and "activated".

The two low bits determine to which wall the hook is attached:
 * 0x0: Facing
 * 0x1: Facing
 * 0x2: Facing
 * 0x3: Facing

Tripwire

 * 0x4: This bit means the tripwire as a whole has been activated.
 * 0x1: This bit means some object is on this particular piece of tripwire.

So, unactivated tripwire has a value of 0x0.

Connection is determined by the neighboring tripwire, similar to redstone wiring.

Heads
Note: Only part of the information for this block is in the data value, the rest in the associated Tile Entity. See Tile Entity Format for details.

Data values determine the block placement:
 * 0x1: On the floor (rotation is stored in the tile entity)
 * 0x2: On a wall, facing
 * 0x3: On a wall, facing
 * 0x4: On a wall, facing
 * 0x5: On a wall, facing

The skull types (for the Item and for the Tile Entity) are:

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

Anvil
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.

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] 383 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.

Usage in Superflat Customization
Block IDs are vital for customizing Superflat worlds. For more information, see the Superflat page.

Trivia

 * When generating a custom superflat world using biome ID -1, the game will crash.
 * 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 an data value of 32, 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) (fun fact: the wool data value of 16 is shown as nether warts, 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. Despite this, the unstacking data value issue still remains.

JSON Data Values

 * Web/Plugin/App Developers looking for a JSON representation of the minecraft data values and PNG images can use the free api at: http://api.mineverse.com (Free registration required to prevent abuse). This list is maintained by a volunteer and has an "update" value that lets you know the latest update. It may not reflect the latest changes here.

Video
Datenwert Data values Valeurs 데이터 값 Datawaardes ID Нумерация данных 数据值