Data Values

This page details the general use of data values, which are additional data which can be stored in some entities to change their appearance and/or behavior in some way. For details on each entity's accepted data values, see the Entity List.

Use

Data values may be specified with an @ sign following the entity name anywhere an entity is listed in a drop file. Example: [email protected]

Data values may also be specified for drops using the data: parameter (see Parameters page for usage).

Colors

A synonym for the data: parameter above is color:. This is because color is a common data value; it can change the appearance (and functionality, in some cases) of WOOL, SHEEP, and DYE.

Available color names are as follows:

"THIS"

"THIS" for datavals - eg:

  SHEEP:
    - drop: [email protected] # will drop wool of same color as sheep
  LOG:
    - drop: [email protected] # drop same log as tree you are breaking
  ANY_CREATURE:
    - drop: [email protected] # drop an egg that spawns the creature just killed

Tool/Armor Damage

For any items which can display a damage bar (this includes armor and tools), the data value is an integer which indicates the amount of damage to the item (a higher value shows decreased remaining durability in the damage bar). The maximum damage each item can take before breaking is particular to the item type (the number is not a percentage); see Entity List for details.

Sheep Values

Sheep can be specified as being SHEARED or UNSHEARED, but they can also be assigned a color value ("Colors," above).

If you wish to specify both a color and a shear status, separate the values with a slash (eg. [email protected]/BLUE). Note that this can't be done in drops, as the slash would interfere with drops' abbreviated drop syntax (see Parameters).

Vehicle Passengers

Vehicles' data values can refer to the passenger of a vehicle by its entity name (eg. [email protected], [email protected]). Vehicles support the following passenger values:

Passenger valueBoatMinecart
Any creature nameNoYes
PLAYER, [email protected]<name>YesYes
EMPTYYesYes
OCCUPIEDYesYes

Container Contents

Data values can also refer the contents of a container by their entity names. The following containers are supported:

  • CHEST
  • STORAGE_MINECART
  • FURNACE / BURNING_FURNACE / ANY_FURNACE
  • POWERED_MINECART
  • DISPENSER
  • JUKEBOX
  • MOB_SPAWNER (experimental)

To specify multiple contents (all of which must be present at once), separate the values with a slash (eg. [email protected]/LAVA_BUCKET to require that a chest contain both TNT and a lava bucket).

The position within a container isn't checked, so [email protected] would match both furnaces smelting logs and furnaces fueled by logs.

Enderman Contents

Endermen also count as a sort of container (see above), which allows for matching of the block type they are carrying (i.e. [email protected]).

Numbers

Data values can be specified as numbers rather than text (numeric values are detailed on the Entity List page). Using numbers, it's possible to specify a range of values, which can be useful in the following scenarios:

  • When paired with an object name, you can specify a range of values for which the drop applies. Example: [email protected]: to specify drops for unripe wheat.
  • When paired with a tool name, you can specify a range of values which can trigger the drop in tool form. Example: tool: [email protected] to require a relatively new diamond sword.
  • When paired with a drop name, OtherDrops will randomly select an integer value within the specified range and assign it to the dropped entity. Example: drop: [email protected] to drop a partially damaged iron helmet.

Data Value Retention

There are some entities for which Minecraft will refuse to retain data values, even if they're assigned data via OtherDrops.

Items
All data values retained.
Creatures
All data values retained.
Blocks
A number of blocks retain data values in block form (see Entity List), but most of those lose their values once the block is converted to inventory form (i.e. during a drop). Only the following blocks presently retain their data values at all times:
  • SAPLING, LOG, LEAVES
  • WOOL
  • STEP, DOUBLE_STEP
  • HUGE_MUSHROOM_1, HUGE_MUSHROOM_2
  • VINES (for some reason)
  • MOB_SPAWNER (experimental)

The following blocks should retain their data values at all times but presently lose them during a drop:

  • LONG_GRASS 1
  • SMOOTH_BRICK 1
  • MONSTER_EGGS 2

1 These problems will be fixed in a future version of OtherDrops.
2 This problem will need to be fixed in Minecraft/Bukkit first.

Note: Although Minecraft is selective about which blocks retain their data values and under what circumstances, neither Minecraft nor OtherDrops presently performs a validity check on those data values. This means that nonstandard data may be specified for data-retaining entities. This could come in handy if you're using some other plugin which assigns meaning to nonstandard data values (example: books whose properties change depending on their data value).