Difference between revisions of "Plugin channels"

From wiki.vg
Jump to navigation Jump to search
(→‎minecraft:trader_list: not tool uses)
(39 intermediate revisions by 6 users not shown)
Line 2: Line 2:
 
{{anchor|Internal}}
 
{{anchor|Internal}}
 
== Reserved channels ==
 
== Reserved channels ==
=== <code>REGISTER</code> ===
+
=== <code>minecraft:register</code> ===
 
''Two-way''
 
''Two-way''
  
 
Allows the client or server to register for one or more custom channels, indicating that data should be sent on those channels if the receiving end supports it too. Payload is a null (<code>0x00</code>) separated list of strings.
 
Allows the client or server to register for one or more custom channels, indicating that data should be sent on those channels if the receiving end supports it too. Payload is a null (<code>0x00</code>) separated list of strings.
  
=== <code>UNREGISTER</code> ===
+
This channel was [https://twitter.com/Dinnerbone/status/1012052979250319360 renamed] from <code>REGISTER</code> in 1.13.
 +
 
 +
=== <code>minecraft:unregister</code> ===
 
''Two-way''
 
''Two-way''
  
 
Allows the client or server to unregister from one or more custom channels, indicating that the receiving end should stop sending data on those channels. Payload is a null-separated list of strings. This is only useful if plugins are disabled/unloaded while the client is connected.
 
Allows the client or server to unregister from one or more custom channels, indicating that the receiving end should stop sending data on those channels. Payload is a null-separated list of strings. This is only useful if plugins are disabled/unloaded while the client is connected.
 +
 +
This channel was [https://twitter.com/Dinnerbone/status/1012052979250319360 renamed] from <code>UNREGISTER</code> in 1.13.
  
 
== Channels internal to Minecraft ==
 
== Channels internal to Minecraft ==
As of 1.3, Minecraft itself started using plugin channels to implement new features. These internal channel names are prefixed by <code>MC|</code>. They are not formally registered using the REGISTER channel. The vanilla Minecraft server will send these packets regardless, and the vanilla client will accept them.
+
Since 1.3, Minecraft itself uses several plugin channels to implement new features. These internal channel names are prefixed by <code>MC|</code>. They are '''not''' formally registered using the register channel. The vanilla Minecraft server will send these packets regardless, and the vanilla client will accept them.
 +
 
 +
Note that there were originally more channels included, but most of these were removed in 1.13.  See [https://wiki.vg/index.php?title=Plugin_channels&oldid=14089 this revision of the article] for the original list.
  
=== <code>MC|AdvCdm</code> ===
+
=== <code>minecraft:brand</code> ===
''Client to Server''
+
''Two-way''
  
Adventure mode command block.  
+
Announces the server and client implementation name right after a player has logged in. For the Notchian client and server server, this is "vanilla" (which is chosen using the Function <code>net.minecraft.client.ClientBrandRetriever.getClientModName()</code>) (encoded as a [[Data Types|protocol string]]: a UTF-8 string with the length prefixed as a VarInt).
  
The first byte is ''type'' which is followed by either:
+
These brands are used in crash reports and a few other locations; it's recommended that custom clients and servers use changed brands for the purpose of identification (for the Notchian client, the class used to get the brand is one of the few non-obfuscated classes).  The brand is not processed in any other way, and Notchian clients will connect to servers with changed brands with no issue (the brand is not used to validate).
  
{| class="wikitable"
+
The Notchian server sends a <code>MC|Brand</code> packet right after it sends a [[Protocol#Join_Game|Join Game]] packet, and the Notchian client sends it right after receiving a Join Game packet.  However, some modified clients and servers will not send this packet (or will take longer to send it than normal), so it is important to not crash if the brand has not been sent.  Additionally, the brand may change at any time (for instance, if connected through a BungeeCord instance, you may switch from a server with one brand to a server with another brand without receiving a Join Game packet).
! Type !! Field Name !! Field Type !! Notes
 
|-
 
| rowspan=5 | 0x00
 
| X || Int ||
 
|-
 
| Y || Int ||
 
|-
 
| Z || Int ||
 
|-
 
| Command || String ||
 
|-
 
| Track Output || Boolean ||
 
|}
 
  
or
+
=== <code>minecraft:book_open</code> ===
 +
''Server to client''
  
{| class="wikitable"
+
When a player right clicks with a signed book. This tells the client to open the book GUI.
! Type !! Field Name !! Field Type !! Notes
 
|-
 
| rowspan=5 | 0x01
 
| Entity ID || Int || 
 
|-
 
| Command || String ||
 
|-
 
| Track Output || Boolean ||
 
|}
 
  
depending on the ''mode''
+
The payload is a VarInt enum for the selected hand: 0 for the main hand, 1 for the offhand.
  
=== <code>MC|AutoCmd</code> ===
+
=== <code>minecraft:trader_list</code> ===
''Client to server''
+
''Server to client''
  
Sets command block data; this seems to be a newer version of <code>MC|AdvCmd</code> but the older version still works.
+
The list of trades a villager NPC is offering.
  
 
{| class="wikitable"
 
{| class="wikitable"
! Field Name !! Field Type !! Notes
+
! colspan="2" | Field Name
|-
+
! colspan="2" | Field Type
| X || Int ||
+
! Notes
|-
+
|-
| Y || Int ||  
+
| colspan="2" | Window ID
|-
+
| colspan="2" | Int
| Z || Int ||  
+
| The ID of the window that is open; this is an int rather than a byte.
|-
+
|-
| Command || String ||
+
| colspan="2" | Size
|-
+
| colspan="2" | Byte
| Track output || Boolean || If false, the output of the previous command will not be stored within the command block.
+
| The number of trades in the following array
|-
+
|-
| Mode || String enum || One of "SEQUENCE", "AUTO", and "REDSTONE"
+
| rowspan="7" | Trades
|-
+
| Input item 1
| Is conditional || Boolean ||
+
| rowspan="7" | Array
|-
+
| Slot
| Automatic || Boolean ||
+
| The first item the villager is buying
|}
+
|-
 +
| Output item
 +
| Slot
 +
| The item the villager is selling
 +
|-
 +
| Has second item
 +
| Boolean
 +
| Whether there is a second item
 +
|-
 +
| Input item 2
 +
| Optional slot
 +
| The second item the villager is buying; only present if they have a second item.
 +
|-
 +
| Trade disabled
 +
| Boolean
 +
| True if the trade is disabled; false if the trade is enabled.
 +
|-
 +
| Number of trade uses
 +
| Int
 +
| Number of times the trade has been used so far
 +
|-
 +
| Maximum number of trade uses
 +
| Int
 +
| Number of times this trade can be used
 +
|}
  
=== <code>MC|Beacon</code> ===
+
=== <code>minecraft:debug/paths</code> ===
''Client to server''
+
''Server to client''
  
Two integers corresponding to the 2 effects a user wishes to have active.
+
[[File:MC-DebugPath_in_16w14a.png|thumb|What appears to be the purpose of <code><nowiki>MC|DebugPath</nowiki></code> as seen in the [http://mojang.com/2016/04/minecraft-snapshot-16w14a/ snapshot 16w14a announcement].  This is ''not'' found in the normal game.]]
  
=== <code>MC|BEdit</code> ===
+
Never sent, but does something with pathfinding debugging.  The client reads the data and stores it, but its renderer cannot be enabled without modifications.
''Client to server''
 
  
When a player edits an unsigned book.
+
{|class="wikitable"
 +
! Name
 +
! Type
 +
! Notes
 +
|-
 +
| Unknown 1
 +
| Int
 +
| Used as a key in the mapping that stores this data; might be an entity ID?
 +
|-
 +
| Unknown 2
 +
| Float
 +
| Appears to be the "radius" of the squares for each pathpoint
 +
|-
 +
| Entity
 +
| PathEntity
 +
| See below
 +
|}
  
This payload is simply a set of bytes corresponding to a [[Slot Data|Slot]].
+
PathEntity structure:
  
The [[NBT]] section of the Slot contains
+
{| class="wikitable"
<code>
+
! Name
  TAG_Compound(<nowiki>''</nowiki>): 1 entry
+
! Type
  {
+
! Notes
    TAG_List('pages'): 2 entries
+
|-
    {
+
| Current path index
      TAG_String(0): 'Something on Page 1'
+
| Int
      TAG_String(1): 'Something on Page 2'
+
| Index in the points array that the entity is currently targeting.  That point is rendered red; the others are rendered blue.
    }
+
|-
  }
+
| Target
</code>
+
| PathPoint
 +
| Rendered as a green cube
 +
|-
 +
| Number of points
 +
| Int
 +
| Number of elements in the following array
 +
|-
 +
| Points array
 +
| Array of PathPoint
 +
| The actual points on the path
 +
|-
 +
| Open set length
 +
| Int
 +
| Number of elements in the following array
 +
|-
 +
| Open set
 +
| Array of PathPoint
 +
| Displayed in blue
 +
|-
 +
| Closed set length
 +
| Int
 +
| Number of elements in the following array
 +
|-
 +
| Closed set
 +
| Array of PathPoint
 +
| Displayed in red
 +
|}
  
=== <code>MC|BSign</code> ===
+
PathPoint structure:
''Client to server''
 
  
When a player signs a book.
+
{| class="wikitable"
 
+
! Name
This payload is simply a set of bytes corresponding to a [[Slot Data|Slot]].
+
! Type
 +
! Notes
 +
|-
 +
| X
 +
| Int
 +
|
 +
|-
 +
| Y
 +
| Int
 +
|
 +
|-
 +
| Z
 +
| Int
 +
|
 +
|-
 +
| Distance from origin
 +
| Float
 +
|
 +
|-
 +
| Cost
 +
| Float
 +
|
 +
|-
 +
| Cost malus
 +
| Float
 +
| Number that is rendered
 +
|-
 +
| Has been visited
 +
| Boolean
 +
|
 +
|-
 +
| Node type
 +
| Int enum
 +
| See below
 +
|-
 +
| Distance to target
 +
| Float
 +
|
 +
|}
  
The Item ID in the Slot should be a Written Book
+
Values for node type:
  
The [[NBT]] section of the Slot contains
+
* 0: BLOCKED
<code>
+
* 1: OPEN
  TAG_Compound(<nowiki>''</nowiki>): 3 entires
+
* 2: WALKABLE
  {
+
* 3: TRAPDOOR
    TAG_String('author'): 'Steve'
+
* 4: FENCE
    TAG_String('title'): 'A Wonderful Book'
+
* 5: LAVA
    TAG_List('pages'): 2 entries
+
* 6: WATER
    {
+
* 7: RAIL
      TAG_String(0): 'Something on Page 1'
+
* 8: DANGER_FIRE
      TAG_String(1): 'Something on Page 2'
+
* 9: DAMAGE_FIRE
    }
+
* 10: DANGER_CACTUS
  }
+
* 11: DAMAGE_CACTUS
</code>
+
* 12: DANGER_OTHER
 +
* 13: DAMAGE_OTHER
 +
* 14: DOOR_OPEN
 +
* 15: DOOR_WOOD_CLOSED
 +
* 16: DOOR_IRON_CLOSED
  
=== <code>MC|BOpen</code> ===
+
=== <code>minecraft:debug/neighbors_update</code> ===
 
''Server to client''
 
''Server to client''
  
When a player right clicks with a signed book. This tells the client to open the book GUI.
+
Never sent, but used to debug block updates. Does not render without modifying the client.
This payload is empty.
 
  
=== <code>MC|ItemName</code> ===
+
{{warning|This channel is invalid, as its name is longer than the max length (23 > 20).}}
''Client to server''
 
  
When a player uses an anvil to name an item. The payload is just a string: the item's new name.
+
{|class="wikitable"
 +
! Name
 +
! Type
 +
! Notes
 +
|-
 +
| Time
 +
| VarLong
 +
| World timestamp at which the update occurred.  200 ticks after this timestamp, the given update stops rendering.
 +
|-
 +
| Location
 +
| Position
 +
| Location of the block that updated.
 +
|}
  
=== <code>MC|Struct</code> ===
+
=== <code>minecraft:debug/caves</code> ===
''Client to server''
 
  
Does something with the (inaccessible) {{Minecraft Wiki|Structure block}}.
+
Never sent, but (presumably) used to debug caves.  Does not render without modifying the client.
  
 
{| class="wikitable"
 
{| class="wikitable"
  ! Field Name
+
  !colspan="2"| Field name
  ! Field Type
+
  !colspan="2"| Field type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | X || Int || Tile entity location
+
  |colspan="2"| Cave position
 +
|colspan="2"| Position
 +
| Rendered as a white cube; also used to determine the color of the other parts.
 
  |-
 
  |-
  | Y || Int || Tile entity location
+
  |colspan="2"| Count
 +
|colspan="2"| Int
 +
| Number of elements in the following array
 
  |-
 
  |-
  | Z || Int || Tile entity location
+
  |rowspan="2"| Data
 +
| Sub position
 +
|rowspan="2"| Array
 +
| Position
 +
|
 
  |-
 
  |-
  | Action
+
  | Radius
  | Byte
+
  | Float
  | See below
+
  | Size of the area, as half of the side-length
 +
|}
 +
 
 +
=== <code>minecraft:debug/structures</code> ===
 +
 
 +
Never sent, but (presumably) used to debug structures.  Does not render without modifying the client.
 +
 
 +
Adds a single new structure, which will always be rendered if the player is in the same dimension.
 +
 
 +
{| class="wikitable"
 +
!colspan="2"| Field name
 +
!colspan="2"| Field type
 +
! Notes
 +
|-
 +
|colspan="2"| Dimension
 +
|colspan="2"| Int
 +
| The dimension the structure is in.
 
  |-
 
  |-
  | Mode
+
  |colspan="2"| Bounding box minX
  | String enum
+
  |colspan="2"| Int
  | One of "SAVE", "LOAD", "CORNER", "DATA".
+
  |rowspan="6"| Main box for the structure (rendered in white). min must be less than max
 
  |-
 
  |-
  | Name
+
  |colspan="2"| Bounding box minY
  | String
+
  |colspan="2"| Int
|
 
 
  |-
 
  |-
  | Position X || Int || ?
+
  |colspan="2"| Bounding box minZ
 +
|colspan="2"| Int
 
  |-
 
  |-
  | Position Y || Int || ?
+
  |colspan="2"| Bounding box maxX
 +
|colspan="2"| Int
 
  |-
 
  |-
  | Position Z || Int || ?
+
  |colspan="2"| Bounding box maxY
 +
|colspan="2"| Int
 
  |-
 
  |-
  | Size X || Int || ?
+
  |colspan="2"| Bounding box maxZ
 +
|colspan="2"| Int
 
  |-
 
  |-
  | Size Y || Int || ?
+
  |colspan="2"| Count
 +
|colspan="2"| Int
 +
| Number of elements in the following array
 
  |-
 
  |-
  | Size Z || Int || ?x
+
  |rowspan="7"| Sub-boxes
 +
| Bounding box minX
 +
|rowspan="7"| Array
 +
| Int
 +
|rowspan="6"| min must be less than max
 
  |-
 
  |-
  | Mirror
+
  | Bounding box minY
  | String enum
+
  | Int
| One of "NONE", "LEFT_RIGHT", "FRONT_BACK".
 
 
  |-
 
  |-
  | Rotation
+
  | Bounding box minZ
  | String enum
+
  | Int
  | One of "NONE", "CLOCKWISE_90", "CLOCKWISE_180", "COUNTERCLOCKWISE_90".
+
  |-
 +
| Bounding box maxX
 +
| Int
 +
|-
 +
| Bounding box maxY
 +
| Int
 
  |-
 
  |-
  | Metadata
+
  | Bounding box maxZ
  | String
+
  | Int
| ?
 
 
  |-
 
  |-
  | Ignore entities
+
  | Flag
 
  | Boolean
 
  | Boolean
  |
+
  | If true, the sub-box is rendered in green, otherwise in blue.
 
  |}
 
  |}
  
Possible modes:
+
=== <code>minecraft:debug/worldgen_attempt</code> ===
 
 
* 2 - Save the structure
 
* 3 - Load the structure
 
* 4 - Detect size
 
  
=== <code>MC|PickItem</code> ===
+
Never sent, but (presumably) used to debug something with world generation.  Does not render without modifying the client.
''Client to server''
 
  
Swaps out an item at the given inventory index(?) with an item on the hotbar.  The server sends back several packetsTODO: Document them.
+
Adds a colored cube of the list of things to renderThis cube is never removed.
  
Payload is a single varint.
+
{{warning|This channel is invalid, as its name is longer than the max length (23 > 20).}}
 
 
=== <code>MC|TrList</code> ===
 
''Server to client''
 
 
 
The list of trades a villager NPC is offering.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
  ! colspan="2" | Field Name
+
  ! Field name
  ! colspan="2" | Field Type
+
  ! Field type
 
  ! Notes
 
  ! Notes
 
  |-
 
  |-
  | colspan="2" | Window ID
+
  | Location
  | colspan="2" | Int
+
  | Position
  | The ID of the window that is open; this is an int rather than a byte.
+
  | The center of the location to render.
|-
 
| colspan="2" | Size
 
| colspan="2" | Byte
 
| The number of trades in the following array
 
 
  |-
 
  |-
  | rowspan="7" | Trades
+
  | Size
| Input item 1
+
  | Float
| rowspan="7" | Array
+
  | Diameter/side length of a cube to render.
  | Slot
 
  | The first item the villager is buying
 
 
  |-
 
  |-
  | Output item
+
  | Red
  | Slot
+
  | Float
  | The item the villager is selling
+
  | Red value to render, from 0.0 to 1.0.
 
  |-
 
  |-
  | Has second item
+
  | Green
  | Boolean
+
  | Float
  | Whether there is a second item
+
  | Green value to render, from 0.0 to 1.0.
 
  |-
 
  |-
  | Input item 2
+
  | Blue
  | Optional slot
+
  | Float
  | The second item the villager is buying; only present if they have a second item.
+
  | Blue value to render, from 0.0 to 1.0.
 
  |-
 
  |-
  | Trade disabled
+
  | Alpha
  | Boolean
+
  | Float
  | True if the trade is disabled; false if the trade is enabled.
+
  | Alpha value to render, from 0.0 to 1.0.
|-
 
| Number of tool uses
 
| Int
 
| May actually be the number of times this trade has been used; MCP may be misleading me
 
|-
 
| Maximum number of trade uses
 
| Int
 
| Number of times this trade can be used
 
 
  |}
 
  |}
 
=== <code>MC|TrSel</code> ===
 
''Client to server''
 
 
When a player selects a specific trade offered by a villager NPC.
 
It contains a single int id corresponding to the selected slot int the players current (trading) inventory.
 
  
 
=== <code>MC|PingHost</code> ===
 
=== <code>MC|PingHost</code> ===
Line 265: Line 371:
 
Sent ''after'' a Server list ping in Minecraft 1.6. More information on [[Server List Ping#1.6]]. In 1.7 and above, the [[Protocol#Request|Request]] ([[Protocol#Status|Status]], 0x00, serverbound) packet is instead sent ''before'' the ping.
 
Sent ''after'' a Server list ping in Minecraft 1.6. More information on [[Server List Ping#1.6]]. In 1.7 and above, the [[Protocol#Request|Request]] ([[Protocol#Status|Status]], 0x00, serverbound) packet is instead sent ''before'' the ping.
  
=== <code>MC|Brand</code> ===
+
{{Warning|Since this plugin channel is only sent for the legacy server list ping, it uses the older packet structure.}}
''Two-way''
 
 
 
Announces the server and client implementation name right after a player has logged in. For Minecraft and the standard Minecraft server, this is "vanilla" (encoded as a UTF-8 string).
 
 
 
=== <code>MC|DebugPath</code> ===
 
''Server to client''
 
 
 
Never sent, but does something with pathfinding debugging.
 
  
 
== Notable community plugin channels ==
 
== Notable community plugin channels ==
 
Channels listed in this section are not used by the vanilla Minecraft client or server. This is just a likely-incomplete list of channels used by mods/plugins popular within the Minecraft community.
 
Channels listed in this section are not used by the vanilla Minecraft client or server. This is just a likely-incomplete list of channels used by mods/plugins popular within the Minecraft community.
  
=== <code>BungeeCord</code> ===
+
=== <code>bungeecord:main</code> ===
 +
 
 +
Formerly <code>BungeeCord</code>; additionally, note that the channel name is remapped by spigot so that the old name can still be used in plugins.
  
 
[http://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/ See here]
 
[http://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/ See here]
  
 
=== <code>FML|HS</code>, <code>FML</code> ===
 
=== <code>FML|HS</code>, <code>FML</code> ===
''Two-way''
+
 
 +
{{Main|Minecraft Forge Handshake}}
  
 
Used by [http://www.minecraftforge.net/forum/index.php Minecraft Forge] to negotiate required mods, among other things.
 
Used by [http://www.minecraftforge.net/forum/index.php Minecraft Forge] to negotiate required mods, among other things.
 
[https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java <code>FML|HS</code>]
 
[https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/fml/common/network/handshake/FMLHandshakeMessage.java <code>FML|HS</code>]
 
[https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java <code>FML</code>]
 
[https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/fml/common/network/internal/FMLNetworkHandler.java <code>FML</code>]
 
For more information, see [[Minecraft Forge Handshake]].
 
  
 
=== <code>ML|OpenTE</code> ===
 
=== <code>ML|OpenTE</code> ===
Line 297: Line 396:
  
 
=== <code>WECUI</code> ===
 
=== <code>WECUI</code> ===
''Two-way''
+
{{Main|/WorldEditCUI}}
  
 
Used by the server-side [http://www.enginehub.org/worldedit/ WorldEdit] and the client-side [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292886-worldeditcui/ WorldEditCUI] to coordinate selections.
 
Used by the server-side [http://www.enginehub.org/worldedit/ WorldEdit] and the client-side [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1292886-worldeditcui/ WorldEditCUI] to coordinate selections.
 +
 +
=== <code>wdl:init</code>, <code>wdl:control</code>, <code>wdl:request</code> ===
 +
 +
{{Main|/World downloader}}
 +
 +
Used by the client-side [http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2520465 World Downloader mod] to get permission information and perform permission requests.
 +
 +
[[Category:Minecraft Modern]]

Revision as of 05:21, 11 January 2019

Plugin channels allow client mods and server plugins to communicate without cluttering up chat. This post by Dinnerbone is a good introduction and basic documentation.

Reserved channels

minecraft:register

Two-way

Allows the client or server to register for one or more custom channels, indicating that data should be sent on those channels if the receiving end supports it too. Payload is a null (0x00) separated list of strings.

This channel was renamed from REGISTER in 1.13.

minecraft:unregister

Two-way

Allows the client or server to unregister from one or more custom channels, indicating that the receiving end should stop sending data on those channels. Payload is a null-separated list of strings. This is only useful if plugins are disabled/unloaded while the client is connected.

This channel was renamed from UNREGISTER in 1.13.

Channels internal to Minecraft

Since 1.3, Minecraft itself uses several plugin channels to implement new features. These internal channel names are prefixed by MC|. They are not formally registered using the register channel. The vanilla Minecraft server will send these packets regardless, and the vanilla client will accept them.

Note that there were originally more channels included, but most of these were removed in 1.13. See this revision of the article for the original list.

minecraft:brand

Two-way

Announces the server and client implementation name right after a player has logged in. For the Notchian client and server server, this is "vanilla" (which is chosen using the Function net.minecraft.client.ClientBrandRetriever.getClientModName()) (encoded as a protocol string: a UTF-8 string with the length prefixed as a VarInt).

These brands are used in crash reports and a few other locations; it's recommended that custom clients and servers use changed brands for the purpose of identification (for the Notchian client, the class used to get the brand is one of the few non-obfuscated classes). The brand is not processed in any other way, and Notchian clients will connect to servers with changed brands with no issue (the brand is not used to validate).

The Notchian server sends a MC|Brand packet right after it sends a Join Game packet, and the Notchian client sends it right after receiving a Join Game packet. However, some modified clients and servers will not send this packet (or will take longer to send it than normal), so it is important to not crash if the brand has not been sent. Additionally, the brand may change at any time (for instance, if connected through a BungeeCord instance, you may switch from a server with one brand to a server with another brand without receiving a Join Game packet).

minecraft:book_open

Server to client

When a player right clicks with a signed book. This tells the client to open the book GUI.

The payload is a VarInt enum for the selected hand: 0 for the main hand, 1 for the offhand.

minecraft:trader_list

Server to client

The list of trades a villager NPC is offering.

Field Name Field Type Notes
Window ID Int The ID of the window that is open; this is an int rather than a byte.
Size Byte The number of trades in the following array
Trades Input item 1 Array Slot The first item the villager is buying
Output item Slot The item the villager is selling
Has second item Boolean Whether there is a second item
Input item 2 Optional slot The second item the villager is buying; only present if they have a second item.
Trade disabled Boolean True if the trade is disabled; false if the trade is enabled.
Number of trade uses Int Number of times the trade has been used so far
Maximum number of trade uses Int Number of times this trade can be used

minecraft:debug/paths

Server to client

What appears to be the purpose of MC|DebugPath as seen in the snapshot 16w14a announcement. This is not found in the normal game.

Never sent, but does something with pathfinding debugging. The client reads the data and stores it, but its renderer cannot be enabled without modifications.

Name Type Notes
Unknown 1 Int Used as a key in the mapping that stores this data; might be an entity ID?
Unknown 2 Float Appears to be the "radius" of the squares for each pathpoint
Entity PathEntity See below

PathEntity structure:

Name Type Notes
Current path index Int Index in the points array that the entity is currently targeting. That point is rendered red; the others are rendered blue.
Target PathPoint Rendered as a green cube
Number of points Int Number of elements in the following array
Points array Array of PathPoint The actual points on the path
Open set length Int Number of elements in the following array
Open set Array of PathPoint Displayed in blue
Closed set length Int Number of elements in the following array
Closed set Array of PathPoint Displayed in red

PathPoint structure:

Name Type Notes
X Int
Y Int
Z Int
Distance from origin Float
Cost Float
Cost malus Float Number that is rendered
Has been visited Boolean
Node type Int enum See below
Distance to target Float

Values for node type:

  • 0: BLOCKED
  • 1: OPEN
  • 2: WALKABLE
  • 3: TRAPDOOR
  • 4: FENCE
  • 5: LAVA
  • 6: WATER
  • 7: RAIL
  • 8: DANGER_FIRE
  • 9: DAMAGE_FIRE
  • 10: DANGER_CACTUS
  • 11: DAMAGE_CACTUS
  • 12: DANGER_OTHER
  • 13: DAMAGE_OTHER
  • 14: DOOR_OPEN
  • 15: DOOR_WOOD_CLOSED
  • 16: DOOR_IRON_CLOSED

minecraft:debug/neighbors_update

Server to client

Never sent, but used to debug block updates. Does not render without modifying the client.

Warning.png This channel is invalid, as its name is longer than the max length (23 > 20).

Name Type Notes
Time VarLong World timestamp at which the update occurred. 200 ticks after this timestamp, the given update stops rendering.
Location Position Location of the block that updated.

minecraft:debug/caves

Never sent, but (presumably) used to debug caves. Does not render without modifying the client.

Field name Field type Notes
Cave position Position Rendered as a white cube; also used to determine the color of the other parts.
Count Int Number of elements in the following array
Data Sub position Array Position
Radius Float Size of the area, as half of the side-length

minecraft:debug/structures

Never sent, but (presumably) used to debug structures. Does not render without modifying the client.

Adds a single new structure, which will always be rendered if the player is in the same dimension.

Field name Field type Notes
Dimension Int The dimension the structure is in.
Bounding box minX Int Main box for the structure (rendered in white). min must be less than max
Bounding box minY Int
Bounding box minZ Int
Bounding box maxX Int
Bounding box maxY Int
Bounding box maxZ Int
Count Int Number of elements in the following array
Sub-boxes Bounding box minX Array Int min must be less than max
Bounding box minY Int
Bounding box minZ Int
Bounding box maxX Int
Bounding box maxY Int
Bounding box maxZ Int
Flag Boolean If true, the sub-box is rendered in green, otherwise in blue.

minecraft:debug/worldgen_attempt

Never sent, but (presumably) used to debug something with world generation. Does not render without modifying the client.

Adds a colored cube of the list of things to render. This cube is never removed.

Warning.png This channel is invalid, as its name is longer than the max length (23 > 20).

Field name Field type Notes
Location Position The center of the location to render.
Size Float Diameter/side length of a cube to render.
Red Float Red value to render, from 0.0 to 1.0.
Green Float Green value to render, from 0.0 to 1.0.
Blue Float Blue value to render, from 0.0 to 1.0.
Alpha Float Alpha value to render, from 0.0 to 1.0.

MC|PingHost

Client to server

Sent after a Server list ping in Minecraft 1.6. More information on Server List Ping#1.6. In 1.7 and above, the Request (Status, 0x00, serverbound) packet is instead sent before the ping.

Warning.png Since this plugin channel is only sent for the legacy server list ping, it uses the older packet structure.

Notable community plugin channels

Channels listed in this section are not used by the vanilla Minecraft client or server. This is just a likely-incomplete list of channels used by mods/plugins popular within the Minecraft community.

bungeecord:main

Formerly BungeeCord; additionally, note that the channel name is remapped by spigot so that the old name can still be used in plugins.

See here

FML|HS, FML

Main article: Minecraft Forge Handshake

Used by Minecraft Forge to negotiate required mods, among other things. FML|HS FML

ML|OpenTE

Server to client

Used by ModLoader to support custom GUI windows. Does not use the REGISTER channel.

WECUI

Main article: /WorldEditCUI

Used by the server-side WorldEdit and the client-side WorldEditCUI to coordinate selections.

wdl:init, wdl:control, wdl:request

Main article: /World downloader

Used by the client-side World Downloader mod to get permission information and perform permission requests.