Difference between revisions of "Classic Protocol Extension/Old Extensions"

From wiki.vg
Jump to navigation Jump to search
(Created page with "The extensions on this page have been deprecated or replaced. ===ExtPlayerList=== ====Version 1 (Deprecated since 28 August 2014)==== :<h5>Client Behavior</h5> :When '''''Ext...")
 
(Deprecate version 1 of BlockDefinitionsExt CPE extension.)
Line 114: Line 114:
 
! class="col0" | Total Size:
 
! class="col0" | Total Size:
 
| class="col1 rightalign" colspan="4" | 3 bytes
 
| class="col1 rightalign" colspan="4" | 3 bytes
 +
|}
 +
 +
===BlockDefinitionsExt===
 +
====Version 1 (Deprecated since 9 May 2016)====
 +
:This extension allows servers to define new block types with custom IDs and appearance, as well as the ability to redefine the properties of standard block types.
 +
:'''Motivation''': To allow defining custom block types that do not have minX/Y/Z values of 0, and maxX/Z values of 1.
 +
:'''Client Behavior''': See the '''''BlockDefinitions''''' specification. Additionally, this extension depends on [[Classic_Protocol_Extension#EnvMapAppearance|EnvMapAppearance extension]] and '''BlockDefinitions''', and must only be enabled if BOTH extensions are mutually supported.
 +
 +
:'''Texturing''': See the '''''BlockDefinitions''''' specification. The MinX/Y/Z and MaxX/Y/Z fields also affect the location within the terrain tile for a given face that the block should sample texels from. (e.g. if minX and minZ was 8, and maxX and maxZ was 16, then for the terrain.png tile with pixels from (0, 0) to (16, 16), the top face would be drawn with the subset of pixels from (8, 8) to (16, 16))
 +
 +
:'''Server Behavior''': See the '''''BlockDefinitions''''' specification.
 +
 +
 +
This packet is the same as DefineBlock packet, except the 'shape field' is replaced by 6 fields indicating the bounding box of the block in pixel coordinates.
 +
Note that this packet does not support sprites, you must send a regular '''''DefineBlock''''' packet for that.
 +
:<h5>DefineBlockExt Packet</h5>
 +
:''Server to Client''
 +
:{| class="wikitable"
 +
|-
 +
| Packet ID
 +
! Field Name
 +
! Field Type
 +
! Example
 +
! Notes
 +
|-
 +
| class="centeralign" rowspan="16" | 37
 +
| class="leftalign" colspan="4" | Following fields from DefineBlock packet: BlockID, Name, Solidity, MovementSpeed, TopTextureID, SideTextureID, BottomTextureID, TransmitsLight, WalkSound, FullBright
 +
|-
 +
| class="centeralign" | MinX
 +
| class="centeralign" | byte
 +
| class="centeralign" | <code>0</code>
 +
| Minimum X coordinate in pixels. Min allowed is 0, max allowed is 15.
 +
|-
 +
| class="centeralign" | MinY
 +
| class="centeralign" | byte
 +
| class="centeralign" | <code>0</code>
 +
| Minimum Y coordinate in pixels. Min allowed is 0, max allowed is 15.
 +
|-
 +
| class="centeralign" | MinZ
 +
| class="centeralign" | byte
 +
| class="centeralign" | <code>0</code>
 +
| Minimum Z coordinate in pixels. Min allowed is 0, max allowed is 15.
 +
|-
 +
| class="centeralign" | MaxX
 +
| class="centeralign" | byte
 +
| class="centeralign" | <code>16</code>
 +
| Maximum X coordinate in pixels. Min allowed is 1, max allowed is 16.
 +
|-
 +
| class="centeralign" | MaxY
 +
| class="centeralign" | byte
 +
| class="centeralign" | <code>16</code>
 +
| Maximum Y coordinate in pixels. Min allowed is 1, max allowed is 16.
 +
|-
 +
| class="centeralign" | MaxZ
 +
| class="centeralign" | byte
 +
| class="centeralign" | <code>16</code>
 +
| Maximum Z coordinate in pixels. Min allowed is 1, max allowed is 16.
 +
|-
 +
| class="leftalign" colspan="4" | Following fields from DefineBlock packet: BlockDraw, FogDensity, FogR, FogG, FogB
 +
|-
 +
! Total Size:
 +
| class="rightalign" colspan="4" | 85 bytes
 
|}
 
|}

Revision as of 12:51, 9 May 2016

The extensions on this page have been deprecated or replaced.

ExtPlayerList

Version 1 (Deprecated since 28 August 2014)

Client Behavior
When ExtAddPlayerName packet is received for an unrecognized NameID, a new entry must be added to the autocompletion list and tab-list. When receiving ExtAddPlayerName packet for an already-listed NameID, client must update its ListName, GroupName, and GroupRank. Name list must persist when client changes worlds/maps.
Names on the tab-list should be grouped by GroupName in the player tab-list. Names within a GroupName should be sorted by GroupRank (in ascending order). Names with the same GroupName and GroupRank should be sorted alphabetically by ListName.
When an ExtAddEntity packet is received, it must be treated as the SpawnPlayer packet. InGameName should be shown above the player's heads in-game. Skin should be loaded using the given SkinName for a player name. When client receives ExtAddEntity packet for an already-spawned player, a duplicate entity must not be spawned and existing entity's position should not be changed. Instead their InGameName and SkinName should be updated. If a negative ID is given for ExtAddEntity, client must update player's own spawn point, InGameName, and SkinName. The client must ignore regular SpawnPlayer packets, if any are received. Name list should not be affected by ExtAddEntity.
Color codes may be either drawn or stripped from ListName, GroupName, and InGameName.
When a standard DespawnPlayer packet is received for a recognized EntityID, player model should be removed from a world. Name list should not be affected by DespawnPlayer.
When ExtRemovePlayerName packet is received for a recognized NameID, they should be removed from autocompletion list and tab-list. When DespawnPlayer or ExtRemovePlayerName packet is received for a negative or unrecognized PlayerID, no action should be taken.
Server Behavior
When a new player connects to the server, ExtAddPlayerName must be sent. GroupName and GroupRank can be used in any way, for example to group players by map/world or rank/class/faction. Server must use ExtAddEntity in place of standard SpawnPlayer packet. Server should re-send ExtAddPlayerName packet, using the identical PlayerID, when player's ListName, GroupName, or GroupRank change. Server must reliably send an ExtRemovePlayerName when the player disconnects. Color codes are permitted in ListName, GroupName, and InGameName.
ExtAddPlayerName Packet
Server to Client
Packet ID Field Name Field Type Example Notes
0x16

(22)

NameID short 5 Between 0 and 255
PlayerName string Notch Player name used for autocompletion.

May be left empty (exclude from autocompletion).

ListName string &c[Op]Notch Name displayed in the in-game list.
GroupName string Staff
GroupRank byte 0 Rank of a player within the group.

A lower number means higher rank.

Total Size: 196 bytes
ExtAddEntity Packet
Server to Client
Packet ID Field Name Field Type Example Notes
0x17

(23)

EntityID byte 5 Between 0 and 127
InGameName string &cNotch Player name to be shown in-game, hovering above player model.
SkinName string Notch Player name whose skin should be used by the client.
Total Size: 130 bytes
ExtRemovePlayerName Packet
Server to Client
Packet ID Field Name Field Type Example Notes
0x18

(24)

NameID short 5 Between 0 and 255

Matches NameID of the ExtAddPlayerName packet

Total Size: 3 bytes

BlockDefinitionsExt

Version 1 (Deprecated since 9 May 2016)

This extension allows servers to define new block types with custom IDs and appearance, as well as the ability to redefine the properties of standard block types.
Motivation: To allow defining custom block types that do not have minX/Y/Z values of 0, and maxX/Z values of 1.
Client Behavior: See the BlockDefinitions specification. Additionally, this extension depends on EnvMapAppearance extension and BlockDefinitions, and must only be enabled if BOTH extensions are mutually supported.
Texturing: See the BlockDefinitions specification. The MinX/Y/Z and MaxX/Y/Z fields also affect the location within the terrain tile for a given face that the block should sample texels from. (e.g. if minX and minZ was 8, and maxX and maxZ was 16, then for the terrain.png tile with pixels from (0, 0) to (16, 16), the top face would be drawn with the subset of pixels from (8, 8) to (16, 16))
Server Behavior: See the BlockDefinitions specification.


This packet is the same as DefineBlock packet, except the 'shape field' is replaced by 6 fields indicating the bounding box of the block in pixel coordinates. Note that this packet does not support sprites, you must send a regular DefineBlock packet for that.

DefineBlockExt Packet
Server to Client
Packet ID Field Name Field Type Example Notes
37 Following fields from DefineBlock packet: BlockID, Name, Solidity, MovementSpeed, TopTextureID, SideTextureID, BottomTextureID, TransmitsLight, WalkSound, FullBright
MinX byte 0 Minimum X coordinate in pixels. Min allowed is 0, max allowed is 15.
MinY byte 0 Minimum Y coordinate in pixels. Min allowed is 0, max allowed is 15.
MinZ byte 0 Minimum Z coordinate in pixels. Min allowed is 0, max allowed is 15.
MaxX byte 16 Maximum X coordinate in pixels. Min allowed is 1, max allowed is 16.
MaxY byte 16 Maximum Y coordinate in pixels. Min allowed is 1, max allowed is 16.
MaxZ byte 16 Maximum Z coordinate in pixels. Min allowed is 1, max allowed is 16.
Following fields from DefineBlock packet: BlockDraw, FogDensity, FogR, FogG, FogB
Total Size: 85 bytes