Entity metadata is a format introduced in Beta 1.2 for sending entity state over the network. This page will document the possible metadata values of mobs and how metadata is encoded in Beta 1.7.3. For the packet used to send the metadata, see Entity Metadata and Spawn Mob Entity.
All entities extending the Entity class must support this bit field at metadata ID 0. In later versions, this is also used for sprinting and eating/drinking. To get the flag at an ID, you can use value & mask != 0.
ID
Bit Mask
Name
0
0x01
Burning
1
0x02
Sneaking
2
0x04
Riding
Relevant Classes
Name (MCP)
Name (Mojang)
Notes
DataWatcher
SynchedEntityData
Watches metadata values for changes and sends packets.
WatchableObject
SynchedEntityData.DataItem
Represents a metadata value that can be changed.
Packet40EntityMetadata
SetEntityDataPacket
The packet that notifies the client of metadata changes in a mob.