Difference between revisions of "Pre-release protocol"

From wiki.vg
Jump to navigation Jump to search
(Update to new guidelines)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently 1.5, protocol 60) to the current pre-release, 13w16b (protocol 63). Note that this page contains bleeding-edge information that may not be completely or correctly documented.
 
This page documents the changes from the [[Protocol|last stable Minecraft release]] (currently 1.5, protocol 60) to the current pre-release, 13w16b (protocol 63). Note that this page contains bleeding-edge information that may not be completely or correctly documented.
 +
 +
He 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 occured to the respective packets there.
  
 
== Protocol Version ==
 
== Protocol Version ==
  
As of 13w16b the protocol version is 63.
+
As of 13w17a the protocol version is 64.
  
 
== New Packets ==
 
== New Packets ==
  
 +
{{anchor|0xC8}}
 
=== Steer Vehicle (0x1B) ===
 
=== Steer Vehicle (0x1B) ===
 
 
''Client to Server''
 
''Client to Server''
  
Line 15: Line 17:
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Packet ID
+
| Packet ID
| class="col1" | Field Name
+
| Field Name
| class="col2" | Field Type
+
| Field Type
| class="col3" | Example
+
| Example
| class="col4" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" rowspan="4" | 0x1B
+
| 0x1B
| class="col1 centeralign" | Sideways
+
| Sideways
| class="col2 centeralign" | float
+
| float
| class="col3 centeralign" | 0.98
+
| 0.98
| class="col4" | Positive to the left of the player
+
| Positive to the left of the player
|- class="row2"
+
|-
| class="col0 centeralign" | Forward
+
| Forward
| class="col1 centeralign" | float
+
| float
| class="col2 centeralign" | -0.98
+
| -0.98
| class="col3" | Positive forward
+
| Positive forward
|- class="row3"
+
|-
| class="col0 centeralign" | Jump
+
| Jump
| class="col1 centeralign" | bool
+
| bool
| class="col2 centeralign" | true
+
| true
| class="col3" |  
+
|  
|- class="row4"
+
|-
| class="col0 centeralign" | Unmount
+
| Unmount
| class="col1 centeralign" | bool
+
| bool
| class="col2 centeralign" | false
+
| false
| class="col3" | True when leaving the vehicle
+
| True when leaving the vehicle
|- class="row5"
+
|-
| class="col0" | Total Size:
+
| Total Size:
| class="col1 rightalign" colspan="4" | 11 bytes
+
| 11 bytes
 
|}
 
|}
  
 
== Changed Packets ==
 
== Changed Packets ==
  
 +
{{anchor|0x08}}
 
=== Update Health (0x08) ===
 
=== Update Health (0x08) ===
 
 
''Server to Client''
 
''Server to Client''
  
Line 58: Line 60:
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Packet ID
+
| Packet ID
| class="col1" | Field Name
+
| Field Name
| class="col2" | Field Type
+
| Field Type
| class="col3" | Example
+
| Example
| class="col4" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" rowspan="3" | 0x08
+
| 0x08
| class="col1 centeralign" | Health
+
| Health
| class="col2 centeralign" | '''float'''
+
| '''float'''
| class="col3 centeralign" | '''20.0'''
+
| '''20.0'''
| class="col4" | 0 or less = dead, 20 = full HP
+
| 0 or less = dead, 20 = full HP
|- class="row2"
+
|-
| class="col0 centeralign" | Food
+
| Food
| class="col1 centeralign" | short
+
| short
| class="col2 centeralign" | 20
+
| 20
| class="col3" | 0 - 20
+
| 0 - 20
|- class="row3"
+
|-
| class="col0 centeralign" | Food Saturation
+
| Food Saturation
| class="col1 centeralign" | float
+
| float
| class="col2 centeralign" | 5.0
+
| 5.0
| class="col3" | Seems to vary from 0.0 to 5.0 in integer increments
+
| Seems to vary from 0.0 to 5.0 in integer increments
|- class="row4"
+
|-
| class="col0" | Total Size:
+
| Total Size:
| class="col1 rightalign" colspan="4" | 11 bytes
+
| 11 bytes
 
|}
 
|}
  
 +
{{anchor|0x13}}
 
=== Entity Action (0x13) ===
 
=== Entity Action (0x13) ===
 
 
''Client to Server''
 
''Client to Server''
  
Line 94: Line 96:
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Packet ID
+
| Packet ID
| class="col1" | Field Name
+
| Field Name
| class="col2" | Field Type
+
| Field Type
| class="col3" | Example
+
| Example
| class="col4" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" rowspan="3" | 0x13
+
| 0x13
| class="col1 centeralign" | EID
+
| EID
| class="col2 centeralign" | int
+
| int
| class="col3 centeralign" | <code>55534</code>
+
| <code>55534</code>
| class="col4" | Player ID
+
| Player ID
|- class="row2"
+
|-
| class="col0 centeralign" | Action ID
+
| Action ID
| class="col1 centeralign" | byte
+
| byte
| class="col2 centeralign" | <code>1</code>
+
| <code>1</code>
| class="col3" | The ID of the action, see below.
+
| The ID of the action, see below.
|- class="row2"
+
|-
| class="col0 centeralign" | '''Unknown'''
+
| '''Unknown'''
| class="col1 centeralign" | int
+
| int
| class="col2 centeralign" | <code>0</code>
+
| <code>0</code>
| class="col3" | Something to do with horses. Ranged from 0 -> 90
+
| Something to do with horses. Ranged from 0 -> 90
|- class="row3"
+
|-
| class="col0" | Total Size:
+
| Total Size:
| class="col1 rightalign" colspan="4" | 10 bytes
+
| 10 bytes
 
|}
 
|}
  
Line 144: Line 146:
 
|}
 
|}
  
 +
{{anchor|0x27}}
 
=== Attach Entity (0x27) ===
 
=== Attach Entity (0x27) ===
 
 
''Server to Client''
 
''Server to Client''
  
Line 151: Line 153:
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Packet ID
+
| Packet ID
| class="col1" | Field Name
+
| Field Name
| class="col2" | Field Type
+
| Field Type
| class="col3" | Example
+
| Example
| class="col4" | Notes
+
| Notes
|- class="row1"
+
|-
| class="col0 centeralign" rowspan="3" | 0x27
+
| 0x27
| class="col1 centeralign" | Entity ID
+
| Entity ID
| class="col2 centeralign" | int
+
| int
| class="col3 centeralign" | <code>1298</code>
+
| <code>1298</code>
| class="col4" | The player entity ID being attached
+
| The player entity ID being attached
|- class="row2"
+
|-
| class="col0 centeralign" | Vehicle ID
+
| Vehicle ID
| class="col1 centeralign" | int
+
| int
| class="col2 centeralign" | <code>1805</code>
+
| <code>1805</code>
| class="col3" | The vehicle entity ID attached to (-1 for unattaching)
+
| The vehicle entity ID attached to (-1 for unattaching)
|- class="row2"
+
|-
| class="col0 centeralign" | '''Leash'''
+
| '''Leash'''
| class="col1 centeralign" | boolean
+
| boolean
| class="col2 centeralign" | <code>false</code>
+
| <code>false</code>
| class="col3" | If set to true, leashes the entity to the vehicle
+
| If set to true, leashes the entity to the vehicle
|- class="row3"
+
|-
| class="col0" | Total Size:
+
| Total Size:
| class="col1 rightalign" colspan="4" | 10 bytes
+
| 10 bytes
 
|}
 
|}
  
 +
{{anchor|0xCA}}
 
=== Player Abilities (0xCA) ===
 
=== Player Abilities (0xCA) ===
 
 
''Two-Way''
 
''Two-Way''
  
Line 190: Line 192:
  
 
{| class="wikitable"
 
{| class="wikitable"
|- class="row0"
+
|-
| class="col0" | Packet ID
+
| Packet ID
| class="col1" | Field Name
+
| Field Name
| class="col2" | Field Type
+
| Field Type
| class="col3" | Example
+
| Example
| class="col4" | Notes
+
| Notes
|- class="row1"
+
|-
 
| class="col0 centeralign" rowspan=4 | 0xCA
 
| class="col0 centeralign" rowspan=4 | 0xCA
| class="col1 centeralign" | Flags
+
| Flags
| class="col2 centeralign" | byte
+
| byte
| class="col3 centeralign" | 5
+
| 5
| class="col4" |  
+
|  
|- class="row2"
+
|-
| class="col0 centeralign" | Flying speed
+
| Flying speed
| class="col1 centeralign" | '''float'''
+
| '''float'''
| class="col2 centeralign" | '''0.05'''
+
| '''0.05'''
| class="col3" | previous integer value divided by 250
+
| previous integer value divided by 250
|- class="row3"
+
|-
| class="col0 centeralign" | Walking speed
+
| Walking speed
| class="col1 centeralign" | '''float'''
+
| '''float'''
| class="col2 centeralign" | '''0.1'''
+
| '''0.1'''
| class="col3" | previous integer value divided by 250
+
| previous integer value divided by 250
|- class="row2"
+
|-
| class="col0" | Total Size:
+
| Total Size:
| class="col1 rightalign" colspan="4" | 10 bytes
+
| 10 bytes
 
|}
 
|}
  

Revision as of 21:46, 20 May 2013

This page documents the changes from the last stable Minecraft release (currently 1.5, protocol 60) to the current pre-release, 13w16b (protocol 63). Note that this page contains bleeding-edge information that may not be completely or correctly documented.

He 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 occured to the respective packets there.

Protocol Version

As of 13w17a the protocol version is 64.

New Packets

Steer Vehicle (0x1B)

Client to Server

Sent by client to steer the horse, minecart and boats. Horses listen to all directions, boats and minecarts only listen to the positive forward value in combination with the direction the player is looking in.

Packet ID Field Name Field Type Example Notes
0x1B Sideways float 0.98 Positive to the left of the player
Forward float -0.98 Positive forward
Jump bool true
Unmount bool false True when leaving the vehicle
Total Size: 11 bytes

Changed Packets

Update Health (0x08)

Server to Client

Sent by the server to update/set the health of the player it is sent to. Added in protocol version 5.

Food saturation acts as a food "overcharge". Food values will not decrease while the saturation is over zero. Players logging in automatically get a saturation of 5.0. Eating food increases the saturation as well as the food bar.

Packet ID Field Name Field Type Example Notes
0x08 Health float 20.0 0 or less = dead, 20 = full HP
Food short 20 0 - 20
Food Saturation float 5.0 Seems to vary from 0.0 to 5.0 in integer increments
Total Size: 11 bytes


Entity Action (0x13)

Client to Server

Sent at least when crouching, leaving a bed, or sprinting. To send action animation to client use 0x28. The client will send this with Action ID = 3 when "Leave Bed" is clicked.

Packet ID Field Name Field Type Example Notes
0x13 EID int 55534 Player ID
Action ID byte 1 The ID of the action, see below.
Unknown int 0 Something to do with horses. Ranged from 0 -> 90
Total Size: 10 bytes

Action ID can be one of the following values:

ID Action
1 Crouch
2 Uncrouch
3 Leave bed
4 Start sprinting
5 Stop sprinting


Attach Entity (0x27)

Server to Client

This packet is sent when a player has been attached to an entity (e.g. Minecart)

Packet ID Field Name Field Type Example Notes
0x27 Entity ID int 1298 The player entity ID being attached
Vehicle ID int 1805 The vehicle entity ID attached to (-1 for unattaching)
Leash boolean false If set to true, leashes the entity to the vehicle
Total Size: 10 bytes


Player Abilities (0xCA)

Two-Way

The latter 2 bytes are used to indicate the walking and flying speeds respectively, while the first byte is used to determine the value of 4 booleans.

The flags are whether damage is disabled (god mode, 8, bit 3), whether the player can fly (4, bit 2), whether the player is flying (2, bit 1), and whether the player is in creative mode (1, bit 0).

To get the values of these booleans, simply AND (&) the byte with 1,2,4 and 8 respectively, to get the 0 or 1 bitwise value. To set them OR (|) them with their repspective masks. The vanilla client sends this packet when the player starts/stops flying with the second parameter changed accordingly. All other parameters are ignored by the vanilla server.

Packet ID Field Name Field Type Example Notes
0xCA Flags byte 5
Flying speed float 0.05 previous integer value divided by 250
Walking speed float 0.1 previous integer value divided by 250
Total Size: 10 bytes

Removed Packets

-None-

Changed Data Types

-None-

Protocol History

-None-