Classic Protocol Extension/Old Extensions
< Classic Protocol Extension
Jump to navigation
Jump to search
Revision as of 12:51, 9 May 2016 by UnknownShadow200 (talk | contribs) (Deprecate version 1 of BlockDefinitionsExt CPE extension.)
The extensions on this page have been deprecated or replaced.
Contents
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