Skip to content

Commit 44f0017

Browse files
committed
fixed PlayerAppearance entities not spawning with correct body rotation
1 parent 5ee4d7a commit 44f0017

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

server/src/entity/entity_appearance.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub struct PlayerAppearance {
9696
}
9797

9898
impl PlayerAppearance {
99-
99+
100100
pub fn new(
101101
metadata: PlayerMetadata,
102102
texture: &'static str,
@@ -146,7 +146,13 @@ impl<W: WorldExtension> EntityAppearance<W> for PlayerAppearance {
146146
current_item: 0,
147147
metadata: self.metadata,
148148
});
149-
player.packet_buffer.write_packet(&EntityYawRotate {
149+
player.write_packet(&EntityRotate {
150+
entity_id: entity.id,
151+
yaw: entity.yaw,
152+
pitch: entity.pitch,
153+
on_ground: false,
154+
});
155+
player.write_packet(&EntityYawRotate {
150156
entity_id: entity.id,
151157
yaw: entity.yaw,
152158
});

0 commit comments

Comments
 (0)