1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
//! 1.12.2 movement state beyond [`PlayerState`](super::PlayerState), kept apart so the 0.4.x
//! types stay as they were: gliding (elytra) with firework rockets.
//!
//! [`tick_ext`](super::tick_ext) runs the same tick as [`tick_in`](super::tick_in) with this
//! state; with a default [`PlayerExt`] the two are identical.
//!
//! # Gliding (elytra), as the 1.12.2 client does it
//!
//! * **Request.** A jump press (not held from the previous tick) while not on the ground, falling
//! (vertical velocity below 0 after the tick's flight toggle), not gliding and not flying, with
//! [`PlayerExt::elytra`] set, sends
//! [`Packet::StartFallFlying`](crate::Packet::StartFallFlying) (`entity_action`
//! `start_fall_flying`) in the tick, before the movement packet. Unlike later versions the
//! 1.12 client does not start gliding itself (and checks neither water nor levitation): the
//! server does, by setting shared flag 7 in the player's entity data
//! ([`PlayerExt::apply_shared_flags`]).
//! * **Glide.** While flag 7 is set, out of water and lava, the travel is the glide
//! (`EntityLivingBase` travel; gravity 0.08, no levitation or slow falling); the box is
//! 0.6 × 0.6 (the size update at the end of the tick, when that box is free). Creative flight
//! clears the flag after its travel. Everything else (landing, water, a broken elytra) is the
//! server's: the client glides on, on the ground too, until the server clears flag 7.
//! * **Rockets.** A rocket the server spawns for the player (spawn-object type 76 whose entity
//! data names the player as its shooter) ticks after the player in the client world's entity
//! list (it was added later), also over columns the client has not loaded: each tick it boosts
//! a gliding player along the look ([`rocket_boost`](super::rocket_boost)). The server
//! removes it when its random life (11 to 22 ticks for a plain rocket) runs out.
/// Movement state beyond [`PlayerState`](super::PlayerState). Default: no elytra, not gliding.