Pre-release protocol: Difference between revisions

From wiki.vg
Jump to navigation Jump to search
imported>Pokechu22
(→‎Clientbound: Chunk data)
imported>Pokechu22
(→‎Clientbound: Chunk data)
(No difference)

Revision as of 16:22, 29 April 2016

This page documents the changes from the last stable Minecraft release (currently 1.9.2, protocol 109) to the current pre-release (currently 1.9.3-pre2, protocol 110). 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

ID Packet name Documentation
Handshaking serverbound
0x00 Handshake added Current }} removed unchanged | (unchanged) | Pre }} }}
Play clientbound
0x09 Update Block Entity added Current }} removed unchanged | (unchanged) | Pre }} }}
0x20 Chunk data added Current }} removed unchanged | (unchanged) | Pre }} }}
0x46 Update Sign (clientbound) added Current }} removed unchanged | (unchanged) | Pre }} }}
0x47}}{{#if:0x46|{{#if:0x47| }}0x46}} Sound Effect added Current }} removed unchanged | (unchanged) | Pre }} }}
0x48}}{{#if:0x47|{{#if:0x48| }}0x47}} Player List Header And Footer added Current }} removed unchanged | (unchanged) | Pre }} }}
0x49}}{{#if:0x48|{{#if:0x49| }}0x48}} Collect Item added Current }} removed unchanged | (unchanged) | Pre }} }}
0x4A}}{{#if:0x49|{{#if:0x4A| }}0x49}} Entity Teleport added Current }} removed unchanged | (unchanged) | Pre }} }}
0x4B}}{{#if:0x4A|{{#if:0x4B| }}0x4A}} Entity Properties added Current }} removed unchanged | (unchanged) | Pre }} }}
0x4C}}{{#if:0x4B|{{#if:0x4C| }}0x4B}} Entity effect added Current }} removed unchanged | (unchanged) | Pre }} }}

New/modified data types

None so far.

MC|StopSound plugin channel

Used to implement the /stopsound command. Stops a sound that is currently playing on the client.

Field name Field type Notes
Sound name String A sound effect name. If left empty, all sounds are stopped.
Sound category String Should be one of the sound categories used in Named Sound Effect, but if it's invalid or empty then it is (intentionally) treated as all sound categories.

Emptiness of sound category or sound name can be combined, IE a empty sound name but a set sound category will stop all sounds in the given category.

Handshaking

Clientbound

No changes so far.

Serverbound

No changes so far.

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 {{#if:109|109}}{{#if:110|{{#if:109| }}110}})
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

Chunk Data

See also: #Unload Chunk{{#if:| for {{{for}}}}}

The server only sends skylight information for chunk pillars in the Overworld, it's up to the client to know in which dimenison the player is currently located. You can also infer this information from the primary bitmask and the amount of uncompressed bytes sent. {{#if:|}}{{#if:This also sends all tile entities in the chunk.|{{#if:| }}This also sends all tile entities in the chunk.}}

Packet ID State Bound To Field Name Field Type Notes
0x20 Play Client Chunk X Int Block coordinate divided by 16, rounded down
Chunk Z Int Block coordinate divided by 16, rounded down
Ground-Up Continuous Boolean This is true if the packet represents all chunk sections in this vertical chunk column, where the Primary Bit Mask specifies exactly which chunk sections are included, and which are air.
Primary Bit Mask VarInt Bitmask with bits set to 1 for every 16×16×16 chunk section whose data is included in Data. The least significant bit represents the chunk section at the bottom of the chunk column (from y=0 to y=15).
Size VarInt Size of Data in bytes, plus size of Biomes in bytes if present
Data Array of Chunk Section The length of the array is equal to the number of bits set in Primary Bit Mask. Chunks are sent bottom-to-top, i.e. the first chunk, if sent, extends from Y=0 to Y=15.
Biomes Optional Byte Array Only if Ground-Up Continuous: biome array, byte per XZ coordinate, 256 bytes total.
Number of tile entities VarInt Length of the following array
Tile entities Array of NBT Tag All tile entities in the chunk. Use the x, y, and z tags in the NBT to determine their positions.

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.