1.7.10: Fix player position too high on login. Closes #87
Adds a new TeleportPlayer_NoGround packet, which is subtly different from TeleportPlayer_NoConfirm. The flags u8 is replaced with an on_ground bool, but more importantly the Y position is the eyes position, so we have to translate to feet position for the client. 1.7.10: https://wiki.vg/index.php?title=Protocol&oldid=6003#Player_Position_And_Look 1.8.9: https://wiki.vg/index.php?title=Protocol&oldid=7368#Player_Position_And_Look
This commit is contained in:
parent
0034756339
commit
a081c73215
|
@ -1310,6 +1310,14 @@ state_packets!(
|
|||
field pitch: f32 =,
|
||||
field flags: u8 =,
|
||||
}
|
||||
packet TeleportPlayer_OnGround {
|
||||
field x: f64 =,
|
||||
field eyes_y: f64 =,
|
||||
field z: f64 =,
|
||||
field yaw: f32 =,
|
||||
field pitch: f32 =,
|
||||
field on_ground: bool =,
|
||||
}
|
||||
/// EntityUsedBed is sent by the server when a player goes to bed.
|
||||
packet EntityUsedBed {
|
||||
field entity_id: VarInt =,
|
||||
|
|
|
@ -42,7 +42,7 @@ protocol_packet_ids!(
|
|||
0x05 => SpawnPosition_i32
|
||||
0x06 => UpdateHealth_u16
|
||||
0x07 => Respawn
|
||||
0x08 => TeleportPlayer_NoConfirm
|
||||
0x08 => TeleportPlayer_OnGround
|
||||
0x09 => SetCurrentHotbarSlot
|
||||
0x0a => EntityUsedBed_i32
|
||||
0x0b => Animation
|
||||
|
|
Loading…
Reference in New Issue