Pre-release protocol

From wiki.vg
Revision as of 15:23, 16 October 2018 by Pokechu22 (talk | contribs) (Document 1.13.2-pre1. (Thanks dinnerbone for mentioning that items changed))
Jump to: navigation, search

This page documents the changes from the last stable Minecraft release (currently 1.13.1, protocol 401) to the current pre-release (currently 1.13.2-pre1, protocol 402). 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.

Slot

Name Type Meaning
Present Boolean True if the item is present; false if it is empty.
Item ID Short Optional VarInt The item ID. A value of -1 signifies that the slot is empty, and no further data follows. Not present if present is false. Item IDs are distinct from block IDs; see Data Generators for more information
Item Count Optional Byte Not present if Item ID is -1 present is false.
NBT Optional NBT Not present if Item ID is -1 present is false. If 0, there is no NBT data, and no further data follows. Otherwise the byte is the start of an NBT blob as shown below:
  COMPOUND ''
    LIST 'StoredEnchantments'
      COMPOUND
        SHORT 'id'
        SHORT 'lvl'
      END
      COMPOUND
        ...
      END
      ...
    END
    INT 'Unbreakable'
    ...
  END

See NBT for more information about the NBT format, and here for the contained information and its format. Note that tool durability is included in NBT, among other things.

Packets

ID Packet name Documentation
Handshaking serverbound
0x00 Handshake Current Pre

New/modified data types

No changes so far.

Entity Metadata

No changes so far.

Block Actions

No changes so far.

Play

Clientbound

No changes so far.

Serverbound

No changes so far.

Handshaking

Clientbound

There are no clientbound packets in the Handshaking state, since the protocol immediately switches to a different state after the client sends the first packet.

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 401 402)
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

Status

Clientbound

No changes so far.

Serverbound

No changes so far.

Login

Clientbound

No changes so far.

Serverbound

No changes so far.