Make server control knockback
This commit is contained in:
+5
-4
@@ -83,7 +83,8 @@ export type ClientMessage =
|
||||
| { type: "view_distance"; distance: number }
|
||||
// answers chunk_batch_finished once the batch is loaded, with how many chunks a tick the client can take
|
||||
| { type: "chunk_batch_received"; chunks_per_tick: number }
|
||||
| { type: "move"; x: number; y: number; z: number; yaw: number; pitch: number }
|
||||
// teleport is the id of the last teleport the client heard of. moves from before the latest one are ignored
|
||||
| { type: "move"; x: number; y: number; z: number; yaw: number; pitch: number; teleport?: number }
|
||||
| { type: "break_block"; x: number; y: number; z: number }
|
||||
// the player started hitting a block, for on_click
|
||||
| { type: "hit_block"; x: number; y: number; z: number }
|
||||
@@ -173,9 +174,9 @@ export type ServerMessage =
|
||||
// it changes. null when it shows nothing any more
|
||||
| { type: "set_block_item"; x: number; y: number; z: number; item: ItemData | null }
|
||||
| { type: "chat"; from?: string; text: string }
|
||||
| { type: "teleport"; x: number; y: number; z: number }
|
||||
// the player was knocked back: their speed is this now, in blocks per second
|
||||
| { type: "set_motion"; vx: number; vy: number; vz: number }
|
||||
// the player is here now. with motion, they're moving that fast (blocks per second) too: the server is moving them,
|
||||
// like when knocked back, and the client keeps going that way until the next one. id counts up, see move
|
||||
| { type: "teleport"; id: number; x: number; y: number; z: number; motion?: [number, number, number] }
|
||||
| { type: "container"; container: ContainerKey; items: (ItemData | null)[] }
|
||||
| { type: "cursor"; item: ItemData | null }
|
||||
| { type: "open_screen"; layout: ScreenLayout; properties: Record<string, number> }
|
||||
|
||||
Reference in New Issue
Block a user