fix player yaw and pitch on join
This commit is contained in:
parent
fd426273e8
commit
d04d865658
42
Cargo.lock
generated
42
Cargo.lock
generated
@ -1490,23 +1490,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
|
||||
|
||||
[[package]]
|
||||
name = "lz4"
|
||||
version = "1.28.1"
|
||||
name = "lz4-java-wrc"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4"
|
||||
checksum = "3ed1c11dbd317fa5d0508cbb5ce47696bb27771e3c9604428e0e98c7c3d76d0d"
|
||||
dependencies = [
|
||||
"lz4-sys",
|
||||
"lz4_flex",
|
||||
"twox-hash",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lz4-sys"
|
||||
version = "1.11.1+lz4-1.10.0"
|
||||
name = "lz4_flex"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
]
|
||||
checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5"
|
||||
|
||||
[[package]]
|
||||
name = "md-5"
|
||||
@ -2071,7 +2068,7 @@ dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"log",
|
||||
"lru",
|
||||
"lz4",
|
||||
"lz4-java-wrc",
|
||||
"num-derive",
|
||||
"num-traits",
|
||||
"pumpkin-config",
|
||||
@ -2679,6 +2676,12 @@ version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "subtle"
|
||||
version = "2.6.1"
|
||||
@ -2820,12 +2823,11 @@ checksum = "3bf63baf9f5039dadc247375c29eb13706706cfde997d0330d05aa63a77d8820"
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.8"
|
||||
version = "1.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
|
||||
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3060,6 +3062,16 @@ version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
||||
|
||||
[[package]]
|
||||
name = "twox-hash"
|
||||
version = "1.6.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "typenum"
|
||||
version = "1.18.0"
|
||||
|
||||
@ -43,7 +43,7 @@ indexmap = "2.9"
|
||||
enum_dispatch = "0.3"
|
||||
derive-getters = "0.5.0"
|
||||
|
||||
thread_local = "1.1.8"
|
||||
thread_local = "1.1.9"
|
||||
lru = "0.14.0"
|
||||
|
||||
tokio-util = { version = "0.7.15", features = ["rt"] }
|
||||
|
||||
@ -59,7 +59,7 @@ const MOJANG_SERVICES_URL: &str = "https://api.minecraftservices.com/";
|
||||
/// 2. Mojang's servers verify the client's credentials and add the player to the their Servers
|
||||
/// 3. Now our server will send a Request to the Session servers and check if the Player has joined the Session Server .
|
||||
///
|
||||
/// See <https://pumpkinmc.org/developer/authentication.html>
|
||||
/// See <https://pumpkinmc.org/developer/networking/authentication>
|
||||
pub async fn authenticate(
|
||||
username: &str,
|
||||
server_hash: &str,
|
||||
|
||||
@ -573,7 +573,7 @@ impl World {
|
||||
false,
|
||||
false,
|
||||
None,
|
||||
0.into(),
|
||||
VarInt(player.get_entity().portal_cooldown.load(Ordering::Relaxed) as i32),
|
||||
self.sea_level.into(),
|
||||
// This should stay true even when reports are disabled.
|
||||
// It prevents the annoying popup when joining the server.
|
||||
@ -735,8 +735,8 @@ impl World {
|
||||
gameprofile.id,
|
||||
i32::from(EntityType::PLAYER.id).into(),
|
||||
pos,
|
||||
entity.yaw.load(),
|
||||
entity.pitch.load(),
|
||||
entity.yaw.load(),
|
||||
entity.head_yaw.load(),
|
||||
0.into(),
|
||||
entity.velocity.load(),
|
||||
@ -762,6 +762,7 @@ impl World {
|
||||
meta.serialize(&mut serializer).unwrap();
|
||||
buf.extend(serializer_buf);
|
||||
}
|
||||
// END
|
||||
buf.put_u8(255);
|
||||
player
|
||||
.client
|
||||
|
||||
Loading…
Reference in New Issue
Block a user