Difference between revisions of "Entity metadata"

From wiki.vg
Jump to navigation Jump to search
m (→‎Entity Metadata: removed redundant subsection)
(→‎Entity Metadata Format: updated for 1.9)
Line 348: Line 348:
 
== Entity Metadata Format ==
 
== Entity Metadata Format ==
  
Note that entity metadata is a totally distinct concept from block metadata. All entities '''must''' send at least one item of metadata, in most cases this will be the health item.
+
Note that entity metadata is a totally distinct concept from block metadata. All entities ''must'' send at least one item of metadata, in most cases this will be the health item.
  
The entity metadata format is quirky dictionary format, where the key and the value's type are packed in a single byte.
+
An Entity Metadata is an array of entries, each of which looks like the following:
  
To parse, repeat the following procedure:
+
{| class="wikitable"
 +
! Name
 +
! Type
 +
! Meaning
 +
|-
 +
| Index
 +
| Unsigned Byte
 +
| Unique index key determining the meaning of the following value, see the table below. If this is <code>0xff</code> then the it is the end of the Entity Metadata array and no more is read.
 +
|-
 +
| Type
 +
| Optional Byte Enum
 +
| Only if Index is not <code>0xff</code>; the type of the index, see the table below
 +
|-
 +
| Value
 +
| Optional ''value of Type''
 +
| Only if Index is not <code>0xff</code>: the value of the metadata field
 +
|}
 +
 
 +
{| class="wikitable"
 +
! Value of Type field
 +
! [[Data types|Type]] of Value field
 +
! Notes
 +
|-
 +
| 0
 +
| Byte
 +
|
 +
|-
 +
| 1
 +
| VarInt
 +
|
 +
|-
 +
| 2
 +
| Float
 +
|
 +
|-
 +
| 3
 +
| String
 +
|
 +
|-
 +
| 4
 +
| [[Chat]]
 +
|
 +
|-
 +
| 5
 +
| [[Slot]]
 +
|
 +
|-
 +
| 6
 +
| Boolean
 +
|
 +
|-
 +
| 7
 +
| Vector3F (Array of Float)
 +
| 3 elements
 +
|-
 +
| 8
 +
| [[Data Types#Position|Position]]
 +
|
 +
|-
 +
| 9
 +
| OptPosition (Boolean + Optional Position)
 +
| Position is present if the Boolean is set to true
 +
|-
 +
| 10
 +
| Direction (VarInt)
 +
| ???
 +
|-
 +
| 11
 +
| OptUUID (Boolean + Optional UUID)
 +
| UUID is present if the Boolean is set to true
 +
|-
 +
| 12
 +
| BlockID (VarInt)
 +
| <code><nowiki>id &lt;&lt; 4 | data</nowiki></code>
 +
|}
 +
 
 +
Entity classes also recursively use fields from classes they extend.
 +
 
 +
=== Entity ===
 +
 
 +
The base class.
 +
 
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
|rowspan="8"| 0
 +
|rowspan="8"| Byte
 +
! Bit mask
 +
! Meaning
 +
|-
 +
| 0x01
 +
| On Fire
 +
|-
 +
| 0x02
 +
| Crouched
 +
|-
 +
| 0x08
 +
| Sprinting
 +
|-
 +
| 0x10
 +
| Eating/drinking/blocking
 +
|-
 +
| 0x20
 +
| Invisible
 +
|-
 +
| 0x40
 +
| Glowing effect
 +
|-
 +
| 0x80
 +
| Flying with {{Minecraft Wiki|elytra}}
 +
|-
 +
| 1
 +
| VarInt
 +
|colspan="2"| Air
 +
|-
 +
| 2
 +
| String
 +
|colspan="2"| Custom name
 +
|-
 +
| 3
 +
| Boolean
 +
|colspan="2"| Is custom name visible
 +
|-
 +
| 4
 +
| Boolean
 +
|colspan="2"| Is silent
 +
|}
 +
 
 +
=== AreaEffectCloud ===
 +
 
 +
Extends [[#Entity|Entity]].
 +
 
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
| 5
 +
| Float
 +
|colspan="2"| Radius
 +
|-
 +
| 6
 +
| VarInt
 +
|colspan="2"| Color (only for mob spell particle)
 +
|-
 +
| 7
 +
| Boolean
 +
|colspan="2"| Ignore radius and show effect as single point, not area
 +
|-
 +
| 8
 +
| VarInt
 +
|colspan="2"| Particle ID
 +
|}
 +
 
 +
=== Arrow ===
  
# Read an unsigned byte
+
Extends [[#Entity|Entity]].
# If this byte == 127, stop reading
 
# Decompose the byte. <br> The bottom 5 bits (0x1F) serve as an identifier (key) for the data to follow. <br> The top 3 bits (0xE0) serve as a type.
 
# Read and unpack based on the type (below)
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! Type
+
! Type
! Meaning
+
!style="width: 250px;" colspan="2"| Meaning
|-  
+
|-
| 0
+
| 5
| Byte
+
| Byte
|-
+
|colspan="2"| Is critical
| 1
+
|}
| Short
 
|-
 
| 2
 
| Int
 
|-
 
| 3
 
| Float
 
|-
 
| 4
 
| UTF-8 String (VarInt prefixed)
 
|-
 
| 5
 
| [[Slot Data|Slot]]
 
|-
 
| 6<sup>*</sup>
 
| Int, Int, Int (x, y, z)
 
|-
 
| 7
 
| Float, Float, Float (pitch, yaw, roll)
 
|}
 
  
<nowiki>*</nowiki>Not currently used
+
=== TippedArrow ===
  
 +
Extends [[#Arrow|Arrow]].
  
In C-like pseudocode:
+
{| class="wikitable"
<source lang="c">
+
! Index
do {
+
! Type
    item = readByte();
+
!style="width: 250px;" colspan="2"| Meaning
    if (item == 0x7F) break;
+
|-
    var index = item & 0x1F;
+
| 6
    var type = item >> 5;
+
| VarInt
   
+
|colspan="2"| Color
    if (type == 0) metadata[index] = readByte();
+
|}
    if (type == 1) metadata[index] = readShort();
 
    if (type == 2) metadata[index] = readInt();
 
    if (type == 3) metadata[index] = readFloat();
 
    if (type == 4) metadata[index] = readString();
 
    if (type == 5) metadata[index] = readSlot();
 
    if (type == 6) {
 
        var vector;
 
        vector.x = readInt();
 
        vector.y = readInt();
 
        vector.z = readInt();
 
        metadata[index] = vector;
 
    }
 
    if (type == 7) {
 
        var rotation;
 
        rotation.pitch = readFloat();
 
        rotation.yaw = readFloat();
 
        rotation.roll = readFloat();
 
        metadata[index] = rotation;
 
    }
 
} while (true);
 
</source>
 
To create the byte, you can use this: (Type << 5 | Index & 0x1F) & 0xFF
 
  
=== Entity ===
+
=== Boat ===
 +
 
 +
Extends [[#Entity|Entity]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2" | Meaning
+
|-
|-
+
| 5
| rowspan="6" | 0
+
| VarInt
| rowspan="6" | Byte
+
|colspan="2"| Time since last hit
! Bit Mask !! Meaning
+
|-
|-
+
| 6
| 0x01 || On Fire
+
| VarInt
|-
+
|colspan="2"| Forward direction
| 0x02 || Crouched
+
|-
|-
+
| 7
| 0x08 || Sprinting
+
| Float
|-
+
|colspan="2"| Damage taken
| 0x10 || Eating/Drinking/Blocking
+
|-
|-
+
| 8
| 0x20 || Invisible
+
| VarInt
|-
+
|colspan="2"| Type
| 1
+
|}
| Short
 
| colspan="2" | Air
 
|-
 
| 2
 
| String
 
| colspan="2" | Name Tag
 
|-
 
| 3
 
| Byte
 
| colspan="2" | Always Show Name Tag
 
|-
 
| 4
 
| Byte
 
| colspan="2" | Silent
 
|}
 
  
=== Living Entity Base ===
+
=== EnderCrystal ===
<sup>Extends [[#Entity|Entity]]</sup>
+
 
 +
Extends [[#Entity|Entity]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 5
| 6
+
| OptPosition
| Float
+
|colspan="2"| Beam target
| Health
+
|-
|-
+
| 6
| 7
+
| Boolean
| Int
+
|colspan="2"| Show bottom
| Potion Effect Color
+
|}
|-
 
| 8
 
| Byte
 
| Is Potion Effect Ambient
 
|-
 
| 9
 
| Byte
 
| Number of Arrows in Entity
 
|}
 
  
=== Living Entity ===
+
=== Fireball ===
<sup>Extends [[#Living Entity Base|Living Entity Base]]</sup>
+
 
 +
Extends [[#Entity|Entity]].
 +
 
 +
No additional metadata.
 +
 
 +
=== WitherSkull ===
 +
 
 +
Extends [[#Fireball|Fireball]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 5
| 15
+
| Boolean
| Byte
+
|colspan="2"| Invulnerable
| Whether the entity has its AI disabled.
+
|}
|}
 
  
=== Ageable ===
+
=== Fireworks ===
<sup>Extends [[#Living Entity|Living Entity]]</sup>
+
 
 +
Extends [[#Entity|Entity]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 5
| 12
+
| [[Slot]]
| Byte
+
|colspan="2"| Firework info
| Entity's Age (Negative = Child)
+
|}
|}
 
  
=== ArmorStand ===
+
=== Hanging ===
<sup>Extends [[#Living Entity Base|Living Entity Base]]</sup>
+
 
 +
Extends [[#Entity|Entity]].
 +
 
 +
No additional metadata.
 +
 
 +
=== ItemFrame ===
 +
 
 +
Extends [[#Hanging|Hanging]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2" | Meaning
+
|-
|-
+
| 5
| rowspan="6" | 10
+
| [[Slot]]
| rowspan="6" | Byte
+
|colspan="2"| Item
! Bit Mask !! Meaning
+
|-
|-
+
| 6
| 0x01 || Small Armorstand
+
| VarInt
|-
+
|colspan="2"| Rotation
| 0x02 || Has Gravity
+
|}
|-
 
| 0x04 || Has Arms
 
|-
 
| 0x08 || Remove BasePlate
 
|-
 
| 0x10 || Marker (Zero bounding box)
 
|-
 
| 11
 
| Float, Float, Float (pitch, yaw, roll)
 
| colspan="2" | Head position
 
|-
 
| 12
 
| Float, Float, Float (pitch, yaw, roll)
 
| colspan="2" | Body position
 
|-
 
| 13
 
| Float, Float, Float (pitch, yaw, roll)
 
| colspan="2" | Left Arm position
 
|-
 
| 14
 
| Float, Float, Float (pitch, yaw, roll)
 
| colspan="2" | Right Arm position
 
|-
 
| 15
 
| Float, Float, Float (pitch, yaw, roll)
 
| colspan="2" | Left Leg position
 
|-
 
| 16
 
| Float, Float, Float (pitch, yaw, roll)
 
| colspan="2" | Right Leg position
 
|}
 
  
=== Human ===
+
=== Item ===
<sup>Extends [[#Living Entity|Living Entity]]</sup>
+
 
 +
Extends [[#Entity|Entity]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2" | Meaning
+
|-
|-
+
| 5
| rowspan="10" | 10
+
| [[Slot]]
| rowspan="10" | Unsigned Byte
+
|colspan="2"| Item
| colspan="2" | Skin flags
+
|}
|-
 
! Bit Mask !! Meaning
 
|-
 
| 0x01 || Cape enabled
 
|-
 
| 0x02 || Jacket enabled
 
|-
 
| 0x04 || Left Sleeve enabled
 
|-
 
| 0x08 || Right Sleeve enabled
 
|-
 
| 0x10 || Left Pants Leg enabled
 
|-
 
| 0x20 || Right Pants Leg enabled
 
|-
 
| 0x40 || Hat enabled
 
|-
 
| 0x80 || Unused
 
|-
 
| 16
 
| Byte
 
| colspan="2" | Appears to be unused
 
|-
 
| 17
 
| Float
 
| colspan="2" | Absorption Hearts
 
|-
 
| 18
 
| Int
 
| colspan="2" | Score
 
|}
 
  
=== Horse ===
+
=== Living ===
<sup>Extends [[#Ageable|Ageable]]</sup>
+
 
 +
Extends [[#Entity|Entity]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="3" | Meaning
+
|-
|-
+
| 5
| rowspan="8" | 16
+
| Byte
| rowspan="8" | Int
+
|colspan="2"| ''Unknown (probably indicates which hand is currently used)''
! Bit Mask
+
|-
! colspan="2" | Meaning
+
| 6
|-
+
| Float
| 0x02
+
|colspan="2"| Health
| colspan="2" | Is Tame
+
|-
|-
+
| 7
| 0x04
+
| VarInt
| colspan="2" | Has Saddle
+
|colspan="2"| Potion effect color
|-
+
|-
| 0x08
+
| 8
| colspan="2" | Has Chest
+
| Boolean
|-
+
|colspan="2"| Is potion effect ambient
| 0x10
+
|-
| colspan="2" | Is bred
+
| 9
|-
+
| VarInt
| 0x20
+
|colspan="2"| Number of arrows in entity
| colspan="2" | Is Eating
+
|}
|-
+
 
| 0x40
+
=== ArmorStand ===
| colspan="2" | Is Rearing
 
|-
 
| 0x80
 
| colspan="2" | Mouth Open
 
|-
 
| rowspan="6" | 19
 
| rowspan="6" | Byte
 
! Value
 
! colspan="2" | Type
 
|-
 
| 0
 
| colspan="2" | Horse
 
|-
 
| 1
 
| colspan="2" | Donkey
 
|-
 
| 2
 
| colspan="2" | Mule
 
|-
 
| 3
 
| colspan="2" | Zombie
 
|-
 
| 4
 
| colspan="2" | Skeleton
 
|-
 
| rowspan="15" | 20
 
| rowspan="15" | Int
 
!Bit Mask
 
! colspan="2" | Meaning
 
|-
 
| rowspan="8" | 0x00FF
 
! Value !! Color
 
|-
 
| 0 || White
 
|-
 
| 1 || Creamy
 
|-
 
| 2 || Chestnut
 
|-
 
| 3 || Brown
 
|-
 
| 4 || Black
 
|-
 
| 5 || Gray
 
|-
 
| 6 || Dark Brown
 
|-
 
| rowspan="6" | 0xFF00
 
! Value !! Style
 
|-
 
| 0 || None
 
|-
 
| 1 || White
 
|-
 
| 2 || Whitefield
 
|-
 
| 3 || White Dots
 
|-
 
| 4 || Black Dots
 
|-
 
| 21
 
| String
 
| colspan="3" | Owner Name
 
|-
 
| rowspan="5" | 22
 
| rowspan="5" | Int
 
! Value
 
! colspan="2" | Type
 
|-
 
| 0
 
| colspan="2" | No Armor
 
|-
 
| 1
 
| colspan="2" | Iron Armor
 
|-
 
| 2
 
| colspan="2" | Gold Armor
 
|-
 
| 3
 
| colspan="2" | Diamond Armor
 
|}
 
  
=== Bat ===
+
Extends [[#Living|Living]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 10
| 16
+
| Byte
| Byte
+
|colspan="2"| Status bit mask
| Is Hanging
+
|-
|}
+
| 11
 +
| Vector3F
 +
|colspan="2"| Head rotation
 +
|-
 +
| 12
 +
| Vector3F
 +
|colspan="2"| Body rotation
 +
|-
 +
| 13
 +
| Vector3F
 +
|colspan="2"| Left arm rotation
 +
|-
 +
| 14
 +
| Vector3F
 +
|colspan="2"| Right arm rotation
 +
|-
 +
| 15
 +
| Vector3F
 +
|colspan="2"| Left leg rotation
 +
|-
 +
| 16
 +
| Vector3F
 +
|colspan="2"| Right leg rotation
 +
|}
  
 +
=== Insentient ===
  
=== Tameable ===
+
Extends [[#Living|Living]].
<sup>Extends [[#Ageable|Ageable]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2"| Meaning
+
|-
|-
+
| 10
| rowspan="3" | 16
+
| Byte
| rowspan="3" | Byte
+
|colspan="2"| Status bit mask (NoAI, Left handed)
! Bit Mask !! Meaning
+
|}
|-
 
| 0x01 || Is Sitting
 
|-
 
| 0x04 || Is Tame
 
|-
 
| 17
 
| String
 
| colspan="2" | Owner Name
 
|}
 
  
 +
=== Ambient ===
  
=== Ocelot ===
+
Extends [[#Insentient|Insentient]].
<sup>Extends [[#Tameable|Tameable]]</sup>
+
 
 +
No additional metadata.
 +
 
 +
=== Bat ===
 +
 
 +
Extends [[#Ambient|Ambient]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 18
+
| Byte
| Byte
+
|colspan="2"| Is hanging
| Ocelot Type
+
|}
|}
+
 
 +
=== Creature ===
 +
 
 +
Extends [[#Insentient|Insentient]].
 +
 
 +
No additional metadata.
  
 +
=== Ageable ===
  
=== Wolf ===
+
Extends [[#Creature|Creature]].
<sup>Extends [[#Tameable|Tameable]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2"| Meaning
+
|-
|-
+
| 11
| rowspan="3" | 16
+
| Boolean
| rowspan="3" | Byte
+
|colspan="2"| Is baby
!Bit Mask !! Meaning
+
|}
|-
+
 
| colspan="2" | Flags from Tameable
+
=== Animal ===
|-
 
| 0x02 || Is Angry
 
|-
 
| 18
 
| Float
 
| colspan="2" | Health
 
|-
 
| 19
 
| Byte
 
| colspan="2" | Begging
 
|-
 
| 20
 
| Byte
 
| colspan="2" | Collar Color
 
|}
 
  
 +
Extends [[#Ageable|Ageable]].
 +
 +
No additional metadata.
 +
 +
=== Horse ===
 +
 +
Extends [[#Animal|Animal]].
 +
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
| 12
 +
| Byte
 +
|colspan="2"| Status bit mask
 +
|-
 +
| 13
 +
| VarInt
 +
|colspan="2"| Type
 +
|-
 +
| 14
 +
| VarInt
 +
|colspan="2"| Variant
 +
|-
 +
| 15
 +
| OptUUID
 +
|colspan="2"| Owner
 +
|-
 +
| 16
 +
| VarInt
 +
|colspan="2"| Armor
 +
|}
  
 
=== Pig ===
 
=== Pig ===
<sup>Extends [[#Ageable|Ageable]]</sup>
+
 
 +
Extends [[#Animal|Animal]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 12
| 16
+
| Boolean
| Byte
+
|colspan="2"| Has saddle
| Has Saddle
+
|}
|}
 
  
 
=== Rabbit ===
 
=== Rabbit ===
<sup>Extends [[#Ageable|Ageable]]</sup>
+
 
 +
Extends [[#Animal|Animal]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 12
| 18
+
| VarInt
| Byte
+
|colspan="2"| Type
| Rabbit Type
+
|}
|}
 
  
 
=== Sheep ===
 
=== Sheep ===
<sup>Extends [[#Ageable|Ageable]]</sup>
+
 
 +
Extends [[#Animal|Animal]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="3"| Meaning
+
|-
|-
+
| 12
| rowspan="19" | 16
+
| Byte
| rowspan="19" | Byte
+
|colspan="2"| Status bit mask
! Bit Mask
+
|}
! colspan="2" | Meaning
 
|-
 
| rowspan="17" | 0x0F
 
! Value !! Color
 
|-
 
| 0 || White
 
|-
 
| 1 || Orange
 
|-
 
| 2 || Magenta
 
|-
 
| 3 || Light Blue
 
|-
 
| 4 || Yellow
 
|-
 
| 5 || Lime
 
|-
 
| 6 || Pink
 
|-
 
| 7 || Gray
 
|-
 
| 8 || Silver
 
|-
 
| 9 || Cyan
 
|-
 
| 10 || Purple
 
|-
 
| 11 || Blue
 
|-
 
| 12 || Brown
 
|-
 
| 13 || Green
 
|-
 
| 14 || Red
 
|-
 
| 15 || Black
 
|-
 
| 0x10
 
| colspan="2" | Is Sheared
 
|}
 
  
 +
=== TameableAnimal ===
  
=== Villager ===
+
Extends [[#Animal|Animal]].
<sup>Extends [[#Ageable|Ageable]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2" | Meaning
+
|-
|-
+
| 12
| rowspan="6" | 16
+
| Byte
| rowspan="6" | Int
+
|colspan="2"| Status bit mask (sitting, tamed)
! Value !! Profession
+
|-
|-
+
| 13
| 0 || Farmer
+
| OptUUID
|-
+
|colspan="2"| Owner
| 1 || Librarian
+
|}
|-
 
| 2 || Priest
 
|-
 
| 3 || Blacksmith
 
|-
 
| 4 || Butcher
 
|}
 
  
 +
=== Ocelot ===
  
=== Enderman ===
+
Extends [[#TameableAnimal|TameableAnimal]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 14
| 16
+
| VarInt
| Short
+
|colspan="2"| Type
| Carried Block
+
|}
|-
+
 
| 17
+
=== Wolf ===
| Byte
 
| Carried Block Data
 
|-
 
| 18
 
| Byte
 
| Is Screaming
 
|}
 
  
=== Zombie ===
+
Extends [[#TameableAnimal|TameableAnimal]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 14
| 12
+
| Float
| Byte
+
|colspan="2"| Damage taken (used for tail rotation)
| Is Child
+
|-
|-
+
| 15
| 13
+
| Boolean
| Byte
+
|colspan="2"| Is begging
| Is Villager
+
|-
|-
+
| 16
| 14
+
| VarInt
| Byte
+
|colspan="2"| Collar color
| Is Converting
+
|}
|}
 
  
=== Zombie Pigman ===
+
=== Villager ===
<sup>Extends [[#Zombie|Zombie]]</sup>
 
  
 +
Extends [[#Ageable|Ageable]].
 +
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
| 12
 +
| VarInt
 +
|colspan="2"| ''Unknown''
 +
|}
  
=== Blaze ===
+
=== Golem ===
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
{| class="wikitable"
+
Extends [[#Creature|Creature]].
|-
 
! style="width: 75px" | Index
 
! style="width: 75px" | Type
 
! style="width: 250px" | Meaning
 
|-
 
| 16
 
| Byte
 
| On Fire
 
|}
 
  
 +
No additional metadata.
  
 +
=== IronGolem ===
  
=== Spider ===
+
Extends [[#Golem|Golem]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 16
+
| Byte
| Byte
+
|colspan="2"| Is player-created
| Climbing
+
|}
|}
+
 
 +
=== Shulker ===
  
 +
Extends [[#Golem|Golem]].
  
=== Cave Spider ===
+
{| class="wikitable"
<sup>Extends [[#Spider|Spider]]</sup>
+
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
| 11
 +
| Direction
 +
|colspan="2"| Facing direction
 +
|-
 +
| 12
 +
| OptPosition
 +
|colspan="2"| Attachment position
 +
|-
 +
| 13
 +
| Byte
 +
|colspan="2"| Shield height
 +
|}
  
 +
=== Monster ===
  
=== Creeper ===
+
Extends [[#Creature|Creature]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
{| class="wikitable"
+
No additional metadata.
|-
 
! style="width: 75px" | Index
 
! style="width: 75px" | Type
 
! style="width: 250px" | Meaning
 
|-
 
| 16
 
| Byte
 
| State (-1 = Idle, 1 = Fuse)
 
|-
 
| 17
 
| Byte
 
| Is Powered
 
|}
 
  
 +
=== Blaze ===
  
=== Ghast ===
+
Extends [[#Monster|Monster]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 16
+
| Byte
| Byte
+
|colspan="2"| Is on fire
| Is Attacking
+
|}
|}
 
  
 +
=== Creeper ===
  
=== Slime ===
+
Extends [[#Monster|Monster]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 16
+
| VarInt
| Byte
+
|colspan="2"| State (-1 = idle, 1 = fuse)
| Size
+
|-
|}
+
| 12
 +
| Boolean
 +
|colspan="2"| Is {{Minecraft Wiki|Creeper#Charged Creepers|charged}}
 +
|-
 +
| 13
 +
| Boolean
 +
|colspan="2"| Is ignited
 +
|}
  
 +
=== Guardian ===
  
=== Magma Cube ===
+
Extends [[#Monster|Monster]].
<sup>Extends [[#Slime|Slime]]</sup>
 
  
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
| 11
 +
| Byte
 +
|colspan="2"| Status bit mask (elderly, retracting spikes)
 +
|-
 +
| 12
 +
| VarInt
 +
|colspan="2"| Target EID
 +
|}
  
 
=== Skeleton ===
 
=== Skeleton ===
<sup>Extends [[#Living Entity|Living Entity]]</sup>
+
 
 +
Extends [[#Monster|Monster]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2" | Meaning
+
|-
|-
+
| 11
| rowspan="3" | 13
+
| VarInt
| rowspan="3" | Byte
+
|colspan="2"| Type
! Value !! Meaning
+
|-
|-
+
| 12
| 0 || Normal
+
| Boolean
|-
+
|colspan="2"| ''Unknown (something hand related)''
| 1 || Wither
+
|}
|}
 
  
 +
=== Spider ===
 +
 +
Extends [[#Monster|Monster]].
 +
 +
{| class="wikitable"
 +
! Index
 +
! Type
 +
!style="width: 250px;" colspan="2"| Meaning
 +
|-
 +
| 11
 +
| Byte
 +
|colspan="2"| Is climbing
 +
|}
  
 
=== Witch ===
 
=== Witch ===
<sup>Extends [[#Living Entity|Living Entity]]</sup>
+
 
 +
Extends [[#Monster|Monster]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px"| Meaning
+
|-
|-
+
| 11
| 21
+
| Boolean
| Byte
+
|colspan="2"| Is aggresive
| Is Agressive
+
|}
|}
 
  
 +
=== Wither ===
  
=== Iron Golem ===
+
Extends [[#Monster|Monster]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px"| Meaning
+
|-
|-
+
| 11
| 16
+
| VarInt
| Byte
+
|colspan="2"| First head's target
| Is Player Created
+
|-
|}
+
| 12
 +
| VarInt
 +
|colspan="2"| Second head's target
 +
|-
 +
| 13
 +
| VarInt
 +
|colspan="2"| Third head's target
 +
|-
 +
| 14
 +
| VarInt
 +
|colspan="2"| Invulnerable time
 +
|}
  
 +
=== Zombie ===
  
=== Wither ===
+
Extends [[#Monster|Monster]].
<sup>Extends [[#Living Entity|Living Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px"| Meaning
+
|-
|-
+
| 11
| 17
+
| Boolean
| Int
+
|colspan="2"| Is baby
| Watched Target
+
|-
|-
+
| 12
| 18
+
| VarInt
| Int
+
|colspan="2"| Is villager (profession)
| Watched Target
+
|-
|-
+
| 13
| 19
+
| Boolean
| Int
+
|colspan="2"| Is converting
| Watched Target
+
|-
|-
+
| 14
| 20
+
| Boolean
| Int
+
|colspan="2"| Are hands held up
| Invulnerable Time
+
|}
|}
 
  
=== Guardian ===
+
=== Enderman ===
<sup>Extends [[#Living Entity|Living Entity]]</sup>
+
 
 +
Extends [[#Monster|Monster]].
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" colspan="2" | Meaning
+
|-
|-
+
| 11
| rowspan="3" | 16
+
| BlockID
| rowspan="3" | Byte
+
|colspan="2"| Carried block
! Bit Mask !! Meaning
+
|-
|-
+
| 12
| 0x02 || Is Elderly
+
| Boolean
|-
+
|colspan="2"| Is screaming
| 0x04 || Is retracting spikes
+
|}
|-
+
 
| 17
+
=== EnderDragon ===
| Int
 
| colspan="2" | Target entity id
 
|}
 
  
=== Boat ===
+
Extends [[#Insentient|Insentient]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px"| Meaning
+
|-
|-
+
| 11
| 17
+
| VarInt
| Int
+
|colspan="2"| Dragon phase
| Time Since Hit
+
|}
|-
 
| 18
 
| Int
 
| Forward Direction
 
|-
 
| 19
 
| Float
 
| Damage Taken
 
|}
 
  
 +
=== Flying ===
  
=== Minecart ===
+
Extends [[#Insentient|Insentient]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
{| class="wikitable"
+
No additional metadata.
|-
 
! style="width: 75px" | Index
 
! style="width: 75px" | Type
 
! style="width: 250px" colspan="2" | Meaning
 
|-
 
| 17
 
| Int
 
| colspan="2" | Shaking Power
 
|-
 
| 18
 
| Int
 
| colspan="2" | Shaking Direction
 
|-
 
| 19
 
| Float
 
| colspan="2" | Damage Taken / Shaking Multiplier
 
|-
 
| rowspan="3" | 20
 
| rowspan="3" | Int
 
! Bit Mask !! Meaning
 
|-
 
| 0x00FF || Block Id
 
|-
 
| 0xFF00 || Block Data
 
|-
 
| 21
 
| Int
 
| colspan="2" | Block Y Position
 
|-
 
| 22
 
| Byte
 
| colspan="2" | Show Block
 
|}
 
  
 +
=== Ghast ===
  
=== Furnace Minecart ===
+
Extends [[#Flying|Flying]].
<sup>Extends [[#Minecart|Minecart]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 16
+
| Boolean
| Byte
+
|colspan="2"| Is attacking
| Is Powered
+
|}
|}
 
  
 +
=== Slime ===
  
=== Item ===
+
Extends [[#Insentient|Insentient]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 10
+
| VarInt
| Slot
+
|colspan="2"| Size
| Item
+
|}
|}
 
  
 +
=== Minecart ===
  
=== Arrow ===
+
Extends [[#Entity|Entity]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 5
| 16
+
| VarInt
| Byte
+
|colspan="2"| Shaking power
| Is Critical
+
|-
|}
+
| 6
 +
| VarInt
 +
|colspan="2"| Shaking direction
 +
|-
 +
| 7
 +
| Float
 +
|colspan="2"| Shaking multiplier
 +
|-
 +
| 8
 +
| VarInt
 +
|colspan="2"| Block ID and damage
 +
|-
 +
| 9
 +
| VarInt
 +
|colspan="2"| Block Y position
 +
|-
 +
| 10
 +
| Boolean
 +
|colspan="2"| Show block
 +
|}
  
 +
=== MinecartCommandBlock ===
  
=== Firework ===
+
Extends [[#Minecart|Minecart]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 8
+
| String
| Slot
+
|colspan="2"| Command
| Firework Info
+
|-
|}
+
| 12
 +
| [[Chat]]
 +
|colspan="2"| Last output
 +
|}
  
 +
=== MinecartFurnace ===
  
=== Item Frame ===
+
Extends [[#Minecart|Minecart]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 11
| 8
+
| Boolean
| Slot
+
|colspan="2"| Is powered
| Item
+
|}
|-
 
| 9
 
| Byte
 
| Rotation
 
|}
 
  
 +
=== TNTPrimed ===
  
=== Ender Crystal ===
+
Extends [[#Entity|Entity]].
<sup>Extends [[#Entity|Entity]]</sup>
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
+
! Index
! style="width: 75px" | Index
+
! Type
! style="width: 75px" | Type
+
!style="width: 250px;" colspan="2"| Meaning
! style="width: 250px" | Meaning
+
|-
|-
+
| 5
| 8
+
| VarInt
| Int
+
|colspan="2"| Fuse time
| Health
+
|}
|}
 

Revision as of 21:12, 29 February 2016

Mobs

Mobs are spawned via Spawn Mob. There are two extra mob types in the code that refer to mobs classes that can never spawn: Mob and Monster (they are always subclasses, aka another more specific type).

Type Name x, z y
48 Mob N/A N/A
49 Monster N/A N/A
50 Creeper 0.6 1.8
51 Skeleton 0.6 1.95
52 Spider 1.4 0.9
53 Giant Zombie 0.6 * 6 1.8 * 6
54 Zombie 0.6 1.8
55 Slime 0.51000005 * size 0.51000005 * size
56 Ghast 4 4
57 Zombie Pigman 0.6 1.8
58 Enderman 0.6 2.9
59 Cave Spider 0.7 0.5
60 Silverfish 0.4 0.3
61 Blaze 0.6 1.8
62 Magma Cube 0.51000005 * size 0.51000005 * size
63 Ender Dragon 16.0 8.0
64 Wither 0.9 3.5
65 Bat 0.5 0.9
66 Witch 0.6 1.8
67 Endermite 0.4 0.3
68 Guardian 0.85 0.85
69 Shulker 1 1
90 Pig 0.9 0.9
91 Sheep 0.9 1.3
92 Cow 0.9 1.3
93 Chicken 0.4 0.7
94 Squid 0.95 0.95
95 Wolf 0.6 0.8
96 Mooshroom 0.9 1.3
97 Snowman 0.7 1.9
98 Ocelot 0.6 0.8
99 Iron Golem 1.4 2.9
100 Horse 1.4 1.6
101 Rabbit 0.6 0.7
120 Villager 0.6 1.8

Objects

Objects are spawned via Spawn Object. See Object Data for more details.

ID Name x, z y
1 Boat 1.5 0.6
2 Item Stack (Slot) 0.25 0.25
3 Area Effect Cloud ? ?
10 Minecart 0.98 0.7
11 (unused since 1.6.x) Minecart (storage) 0.98 0.7
12 (unused since 1.6.x) Minecart (powered) 0.98 0.7
50 Activated TNT 0.98 0.98
51 EnderCrystal 2.0 2.0
60 Arrow (projectile) 0.5 0.5
61 Snowball (projectile) 0.25 0.25
62 Egg (projectile) 0.25 0.25
63 FireBall (ghast projectile) 1.0 1.0
64 FireCharge (blaze projectile) 0.3125 0.3125
65 Thrown Enderpearl 0.25 0.25
66 Wither Skull (projectile) 0.3125 0.3125
67 Shulker Bullet 0.3125 0.3125
70 Falling Objects 0.98 0.98
71 Item frames varies varies
72 Eye of Ender 0.25 0.25
73 Thrown Potion 0.25 0.25
74 Falling Dragon Egg 0.98 0.98
75 Thrown Exp Bottle 0.25 0.25
76 Firework Rocket 0.25 0.25
77 Leash Knot 0.5 0.5
78 ArmorStand 0.5 2.0
90 Fishing Float 0.25 0.25
91 Spectral Arrow 0.5 0.5
92 Tipped Arrow 0.5 0.5
93 Dragon Fireball 0.3125 0.3125

Since release 1.6, all minecarts are spawned with object type 10 and their functionality is then specified in the Data field within the packet. Also, their visual appearance may be sent via the Entity Metadata packet.

Entity Metadata Format

Note that entity metadata is a totally distinct concept from block metadata. All entities must send at least one item of metadata, in most cases this will be the health item.

An Entity Metadata is an array of entries, each of which looks like the following:

Name Type Meaning
Index Unsigned Byte Unique index key determining the meaning of the following value, see the table below. If this is 0xff then the it is the end of the Entity Metadata array and no more is read.
Type Optional Byte Enum Only if Index is not 0xff; the type of the index, see the table below
Value Optional value of Type Only if Index is not 0xff: the value of the metadata field
Value of Type field Type of Value field Notes
0 Byte
1 VarInt
2 Float
3 String
4 Chat
5 Slot
6 Boolean
7 Vector3F (Array of Float) 3 elements
8 Position
9 OptPosition (Boolean + Optional Position) Position is present if the Boolean is set to true
10 Direction (VarInt) ???
11 OptUUID (Boolean + Optional UUID) UUID is present if the Boolean is set to true
12 BlockID (VarInt) id << 4 | data

Entity classes also recursively use fields from classes they extend.

Entity

The base class.

Index Type Meaning
0 Byte Bit mask Meaning
0x01 On Fire
0x02 Crouched
0x08 Sprinting
0x10 Eating/drinking/blocking
0x20 Invisible
0x40 Glowing effect
0x80 Flying with elytra
1 VarInt Air
2 String Custom name
3 Boolean Is custom name visible
4 Boolean Is silent

AreaEffectCloud

Extends Entity.

Index Type Meaning
5 Float Radius
6 VarInt Color (only for mob spell particle)
7 Boolean Ignore radius and show effect as single point, not area
8 VarInt Particle ID

Arrow

Extends Entity.

Index Type Meaning
5 Byte Is critical

TippedArrow

Extends Arrow.

Index Type Meaning
6 VarInt Color

Boat

Extends Entity.

Index Type Meaning
5 VarInt Time since last hit
6 VarInt Forward direction
7 Float Damage taken
8 VarInt Type

EnderCrystal

Extends Entity.

Index Type Meaning
5 OptPosition Beam target
6 Boolean Show bottom

Fireball

Extends Entity.

No additional metadata.

WitherSkull

Extends Fireball.

Index Type Meaning
5 Boolean Invulnerable

Fireworks

Extends Entity.

Index Type Meaning
5 Slot Firework info

Hanging

Extends Entity.

No additional metadata.

ItemFrame

Extends Hanging.

Index Type Meaning
5 Slot Item
6 VarInt Rotation

Item

Extends Entity.

Index Type Meaning
5 Slot Item

Living

Extends Entity.

Index Type Meaning
5 Byte Unknown (probably indicates which hand is currently used)
6 Float Health
7 VarInt Potion effect color
8 Boolean Is potion effect ambient
9 VarInt Number of arrows in entity

ArmorStand

Extends Living.

Index Type Meaning
10 Byte Status bit mask
11 Vector3F Head rotation
12 Vector3F Body rotation
13 Vector3F Left arm rotation
14 Vector3F Right arm rotation
15 Vector3F Left leg rotation
16 Vector3F Right leg rotation

Insentient

Extends Living.

Index Type Meaning
10 Byte Status bit mask (NoAI, Left handed)

Ambient

Extends Insentient.

No additional metadata.

Bat

Extends Ambient.

Index Type Meaning
11 Byte Is hanging

Creature

Extends Insentient.

No additional metadata.

Ageable

Extends Creature.

Index Type Meaning
11 Boolean Is baby

Animal

Extends Ageable.

No additional metadata.

Horse

Extends Animal.

Index Type Meaning
12 Byte Status bit mask
13 VarInt Type
14 VarInt Variant
15 OptUUID Owner
16 VarInt Armor

Pig

Extends Animal.

Index Type Meaning
12 Boolean Has saddle

Rabbit

Extends Animal.

Index Type Meaning
12 VarInt Type

Sheep

Extends Animal.

Index Type Meaning
12 Byte Status bit mask

TameableAnimal

Extends Animal.

Index Type Meaning
12 Byte Status bit mask (sitting, tamed)
13 OptUUID Owner

Ocelot

Extends TameableAnimal.

Index Type Meaning
14 VarInt Type

Wolf

Extends TameableAnimal.

Index Type Meaning
14 Float Damage taken (used for tail rotation)
15 Boolean Is begging
16 VarInt Collar color

Villager

Extends Ageable.

Index Type Meaning
12 VarInt Unknown

Golem

Extends Creature.

No additional metadata.

IronGolem

Extends Golem.

Index Type Meaning
11 Byte Is player-created

Shulker

Extends Golem.

Index Type Meaning
11 Direction Facing direction
12 OptPosition Attachment position
13 Byte Shield height

Monster

Extends Creature.

No additional metadata.

Blaze

Extends Monster.

Index Type Meaning
11 Byte Is on fire

Creeper

Extends Monster.

Index Type Meaning
11 VarInt State (-1 = idle, 1 = fuse)
12 Boolean Is charged
13 Boolean Is ignited

Guardian

Extends Monster.

Index Type Meaning
11 Byte Status bit mask (elderly, retracting spikes)
12 VarInt Target EID

Skeleton

Extends Monster.

Index Type Meaning
11 VarInt Type
12 Boolean Unknown (something hand related)

Spider

Extends Monster.

Index Type Meaning
11 Byte Is climbing

Witch

Extends Monster.

Index Type Meaning
11 Boolean Is aggresive

Wither

Extends Monster.

Index Type Meaning
11 VarInt First head's target
12 VarInt Second head's target
13 VarInt Third head's target
14 VarInt Invulnerable time

Zombie

Extends Monster.

Index Type Meaning
11 Boolean Is baby
12 VarInt Is villager (profession)
13 Boolean Is converting
14 Boolean Are hands held up

Enderman

Extends Monster.

Index Type Meaning
11 BlockID Carried block
12 Boolean Is screaming

EnderDragon

Extends Insentient.

Index Type Meaning
11 VarInt Dragon phase

Flying

Extends Insentient.

No additional metadata.

Ghast

Extends Flying.

Index Type Meaning
11 Boolean Is attacking

Slime

Extends Insentient.

Index Type Meaning
11 VarInt Size

Minecart

Extends Entity.

Index Type Meaning
5 VarInt Shaking power
6 VarInt Shaking direction
7 Float Shaking multiplier
8 VarInt Block ID and damage
9 VarInt Block Y position
10 Boolean Show block

MinecartCommandBlock

Extends Minecart.

Index Type Meaning
11 String Command
12 Chat Last output

MinecartFurnace

Extends Minecart.

Index Type Meaning
11 Boolean Is powered

TNTPrimed

Extends Entity.

Index Type Meaning
5 VarInt Fuse time