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
//! 1.16.5 movement state beyond [`PlayerState`](super::PlayerState), kept apart so the 0.4.0
//! types stay as they were: the level's dimension type and riptide.
//!
//! [`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.
//!
//! # The dimension type, as the 1.16.5 client does it
//!
//! The client world is built with the dimension type of the join packet (`dimension`, the whole
//! dimension type compound), and a respawn packet replaces the world (and its dimension type)
//! only when the world name changes. Of its fields only `ultrawarm` changes the player's
//! movement: `Entity.updateWaterState` pushes with lava's flow at 0.007 instead of
//! 0.0023333333333333335 (the nether). Set [`PlayerExt::ultrawarm`] from it.
//!
//! # Riptide, as the 1.16.5 client does it
//!
//! * **Use.** `TridentItem.use` refuses a riptide trident unless the player is in water or rain
//! ([`in_water_or_rain`](super::in_water_or_rain)) or the next point of damage would break
//! it; a held use key retries every 4 ticks (`MinecraftClient.itemUseCooldown`).
//! * **Launch.** Releasing the use key after at least 10 player ticks of use, still in water or
//! rain, calls [`riptide`](super::riptide) on the client: a push along the look, the 20-tick
//! counter ([`PlayerExt::riptide_ticks`]) and, on the ground, a 1.2-block move up. No riding or
//! durability check at the release.
//! * **Spin.** After each tick's travel the counter goes down; a living entity in the swept box
//! ends it and reverses the motion (×−0.2); with no entity in that box a horizontal collision
//! ends it (`LivingEntity.tickRiptide`; pass the other entities as
//! [`Surroundings::others`](super::Surroundings)). The spin pose follows the server's living
//! entity flag 4 ([`PlayerExt::apply_living_flags`]), not the counter.
/// Movement state beyond [`PlayerState`](super::PlayerState). Default: the overworld, no spin.