Player skins !
This commit is contained in:
+5
-1
@@ -7,7 +7,7 @@ export const AIR_ID = "bworld:air";
|
||||
|
||||
// bump when a client and server of different versions can't play together.
|
||||
// the server rejects a different version before the client downloads anything
|
||||
export const PROTOCOL_VERSION = 6;
|
||||
export const PROTOCOL_VERSION = 7;
|
||||
|
||||
export interface PlayerInfo {
|
||||
id: string;
|
||||
@@ -17,6 +17,8 @@ export interface PlayerInfo {
|
||||
z: number;
|
||||
yaw: number;
|
||||
pitch: number;
|
||||
// a 64x64 png as base64, see /skin. the default skin when there isn't one
|
||||
skin?: string;
|
||||
}
|
||||
|
||||
// an entity that isn't a player, as the server first sends it. players have their own messages
|
||||
@@ -108,6 +110,8 @@ export type ServerMessage =
|
||||
| { type: "player_join"; player: PlayerInfo }
|
||||
| { type: "player_leave"; id: string }
|
||||
| { type: "player_move"; id: string; x: number; y: number; z: number; yaw: number; pitch: number }
|
||||
// a player changed their skin, including the one receiving it. without skin it's back to the default
|
||||
| { type: "player_skin"; id: string; skin?: string }
|
||||
| { type: "add_entity"; entity: EntityInfo }
|
||||
| { type: "move_entity"; id: string; x: number; y: number; z: number }
|
||||
// a dropped item's stack changed, like when two stacks merge
|
||||
|
||||
Reference in New Issue
Block a user