Teleport handling
cinnabar:extension/teleport-handling@0.1.0
Local-player MovePlayer rotations before they apply, for handle-teleport.
Grants: camera to run handle-teleport; this interface only defines handler types.
Types
rotation
Bedrock degrees: yaw turns clockwise from south; positive pitch looks down.
record rotation {
yaw: f32,
pitch: f32,
}
| Member | Type | Description |
|---|---|---|
yaw | f32 | |
pitch | f32 |
teleport-mode
How the server moved the local player, as MovePlayer reports it.
enum teleport-mode {
normal,
reset,
teleport,
rotation,
other,
}
| Member | Type | Description |
|---|---|---|
normal | ||
reset | ||
teleport | ||
rotation | ||
other |
teleport-context
One committed MovePlayer for the local player. Only rotation is changeable; position,
physics and acknowledgments always follow the server.
record teleport-context {
mode: teleport-mode,
server: rotation,
presented: rotation,
rotation: rotation,
}
| Member | Type | Description |
|---|---|---|
mode | teleport-mode | |
server | rotation | The rotation the server sent. |
presented | rotation | The local view immediately before this move. |
rotation | rotation | The rotation the view takes: the server’s, or an earlier handler’s replacement. Set it to presented to keep the current view. |
Types: rotation, teleport-mode.
Functions
This interface defines shared types and has no functions.