Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(New Entity IDs)
Line 30: Line 30:
  
 
== New/modified data types ==
 
== New/modified data types ==
 +
 +
=== Mobs ===
 +
 +
Mobs are spawned via [[Protocol#Spawn_Mob|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).
 +
 +
{| class="wikitable"
 +
|-
 +
! Type
 +
! Name
 +
! x, z
 +
! y
 +
|- style="background-color: #d9ead3;"
 +
| 4
 +
| ElderGuardian
 +
| 0.85
 +
| 0.85
 +
|- style="background-color: #d9ead3;"
 +
| 5
 +
| WitherSkeleton
 +
| 0.7
 +
| 2.4
 +
|- style="background-color: #d9ead3;"
 +
| 6
 +
| Stray
 +
| 0.6
 +
| 1.99
 +
|- style="background-color: #d9ead3;"
 +
| 23
 +
| Husk
 +
| 0.6
 +
| 1.95
 +
|- style="background-color: #d9ead3;"
 +
| 27
 +
| ZombieVillager
 +
| 0.6
 +
| 1.95
 +
|- style="background-color: #d9ead3;"
 +
| 28
 +
| SkeletonHorse
 +
| 1.4
 +
| 1.6
 +
|- style="background-color: #d9ead3;"
 +
| 29
 +
| ZombieHorse
 +
| 1.4
 +
| 1.6
 +
|- style="background-color: #d9ead3;"
 +
| 31
 +
| Donkey
 +
| 1.4
 +
| 1.6
 +
|- style="background-color: #d9ead3;"
 +
| 32
 +
| Mule
 +
| 1.4
 +
| 1.6
 +
|-
 +
| 48
 +
| Mob
 +
| N/A
 +
| N/A
 +
|-
 +
| 49
 +
| Monster
 +
| N/A
 +
| N/A
 +
|-
 +
| 50
 +
| Creeper
 +
| 0.6
 +
| 1.7
 +
|-
 +
| 51
 +
| Skeleton
 +
| 0.6
 +
| 1.99
 +
|-
 +
| 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.4
 +
|-
 +
| 93
 +
| Chicken
 +
| 0.4
 +
| 0.7
 +
|-
 +
| 94
 +
| Squid
 +
| 0.8
 +
| 0.8
 +
|-
 +
| 95
 +
| Wolf
 +
| 0.6
 +
| 0.85
 +
|-
 +
| 96
 +
| Mooshroom
 +
| 0.9
 +
| 1.3
 +
|-
 +
| 97
 +
| Snowman
 +
| 0.7
 +
| 1.9
 +
|-
 +
| 98
 +
| Ocelot
 +
| 0.6
 +
| 0.8
 +
|-
 +
| 99
 +
| Iron Golem
 +
| 1.4
 +
| 2.7
 +
|-
 +
| 100
 +
| Horse
 +
| 1.4
 +
| 1.6
 +
|-
 +
| 101
 +
| Rabbit
 +
| 0.4
 +
| 0.5
 +
|-
 +
| 102
 +
| Polar Bear
 +
| 1.3
 +
| 1.4
 +
|-
 +
| 120
 +
| Villager
 +
| 0.6
 +
| 1.95
 +
|}
  
 
=== Entity Metadata ===
 
=== Entity Metadata ===

Revision as of 19:21, 10 August 2016

This page documents the changes from the last stable Minecraft release (currently 1.10.2, protocol 210) to the current pre-release (currently 16w32a, protocol 301). Note that this page contains bleeding-edge information that may not be completely or correctly documented.

One who wishes to commandeer the merging of this into Protocol when an update is made must be sure to respect any changes that may have occurred to the respective packets there.

Contents

Data types

No changes so far.

Packets

No changes so far.

ID Packet name Documentation
Handshaking serverbound
0x00 Handshake Current Pre
Play clientbound
0x03 Spawn Mob Current Pre
0x48 Collect Item Current Pre

New/modified data types

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
4 ElderGuardian 0.85 0.85
5 WitherSkeleton 0.7 2.4
6 Stray 0.6 1.99
23 Husk 0.6 1.95
27 ZombieVillager 0.6 1.95
28 SkeletonHorse 1.4 1.6
29 ZombieHorse 1.4 1.6
31 Donkey 1.4 1.6
32 Mule 1.4 1.6
48 Mob N/A N/A
49 Monster N/A N/A
50 Creeper 0.6 1.7
51 Skeleton 0.6 1.99
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.4
93 Chicken 0.4 0.7
94 Squid 0.8 0.8
95 Wolf 0.6 0.85
96 Mooshroom 0.9 1.3
97 Snowman 0.7 1.9
98 Ocelot 0.6 0.8
99 Iron Golem 1.4 2.7
100 Horse 1.4 1.6
101 Rabbit 0.4 0.5
102 Polar Bear 1.3 1.4
120 Villager 0.6 1.95

Entity Metadata

AbstractSkeleton

Extends Monster.

Index Type Meaning
12 Boolean Is swinging arms

Skeleton

Extends AbstractSkeleton.

Index Type Meaning
12 VarInt Type (Normal = 0, Wither = 1, Stray = 2)
13 Boolean Is swinging arms (Used to animate arms for melee attacks; only used when the skeleton does not have a bow in its hand)

Wither Skeleton

Extends AbstractSkeleton.

Stray

Extends AbstractSkeleton.

Zombie

Extends Monster.

Index Type Meaning
12 Boolean Is baby
13 VarInt Zombie type (0 for zombie, profession+1 for villagers, 6 for Husk)
14 Boolean Is converting
15 14 Boolean Are hands held up

Zombie Villager

Extends Zombie.

Index Type Meaning
15 Boolean Is converting
16 VarInt Profession

Husk

Extends Zombie.

Guardian

Extends Monster.

Index Type Meaning
12 Byte Bit mask Meaning
0x02 is retracting spikes
0x04 is elderly
12 Boolean Is retracting spikes
13 VarInt Target EID

ElderGuardian

Extends Guardian.

AbstractHorse

Extends Animal.

Index Type Meaning
13 Byte Bit mask Meaning
0x01 Unused
0x02 Is Tame
0x04 Is saddled
0x08 Has Chest
0x10 Is Bred (not used on the Notchian server; controlled via the unused Bred NBT flag)
0x20 Is eating
0x40 Is rearing (on hind legs)
0x80 Is mouth open
14 OptUUID Owner

Horse

Extends AbstractHorse.

Index Type Meaning
15 VarInt Variant (Color & Style)
16 VarInt Armor

ZombieHorse

Extends AbstractHorse.

SkeletonHorse

Extends AbstractHorse.

ChestedHorse

Extends AbstractHorse.

Index Type Meaning
15 Boolean Has Chest

Donkey

Extends ChestedHorse.

Mule

Extends ChestedHorse.

Handshaking

Clientbound

No changes so far.

Serverbound

Handshake

This causes the server to switch into the target state.

Packet ID State Bound To Field Name Field Type Notes
0x00 Handshaking Server Protocol Version VarInt See protocol version numbers (currently 210 301)
Server Address String Hostname or IP, e.g. localhost or 127.0.0.1, that was used to connect. The Notchian server does not use this information.
Server Port Unsigned Short Default is 25565. The Notchian server does not use this information.
Next State VarInt Enum 1 for status, 2 for login

Play

Clientbound

Spawn Mob

Sent by the server when a mob entity is spawned.

Packet ID State Bound To Field Name Field Type Notes
0x03 Play Client Entity ID VarInt
Entity UUID UUID
Type Unsigned Byte VarInt The type of mob. See Entities#Mobs
X Double
Y Double
Z Double
Yaw Angle
Pitch Angle
Head Pitch Angle
Velocity X Short Same units as Entity Velocity
Velocity Y Short Same units as Entity Velocity
Velocity Z Short Same units as Entity Velocity
Metadata Entity Metadata

Collect Item

Sent by the server when someone picks up an item lying on the ground — its sole purpose appears to be the animation of the item flying towards you. It doesn't destroy the entity in the client memory, and it doesn't add it to your inventory. The server only checks for items to be picked up after each Player Position (and Player Position And Look) packet sent by the client.

Packet ID State Bound To Field Name Field Type Notes
0x48 Play Client Collected Entity ID VarInt
Collector Entity ID VarInt
Pickup Item Count VarInt Seems to be 1 for XP orbs, otherwise the number of items in the stack.

Serverbound

No changes so far.

Status

Clientbound

No changes so far.

Serverbound

No changes so far.

Login

Clientbound

No changes so far.

Serverbound

No changes so far.