Skip to content

Commit

Permalink
fix codegen and broken packets to finish updating to 24w39a :D
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Oct 17, 2024
1 parent 2d5dec9 commit f3c5bff
Show file tree
Hide file tree
Showing 11 changed files with 2,151 additions and 534 deletions.
2 changes: 1 addition & 1 deletion azalea-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ impl Client {
debug!("Got compression request {:?}", p.compression_threshold);
conn.set_compression_threshold(p.compression_threshold);
}
ClientboundLoginPacket::GameProfile(p) => {
ClientboundLoginPacket::LoginFinished(p) => {
debug!(
"Got profile {:?}. handshake is finished and we're now switching to the configuration state",
p.game_profile
Expand Down
24 changes: 12 additions & 12 deletions azalea-client/src/packet_handling/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,25 +446,25 @@ pub fn process_packet_events(ecs: &mut World) {
let is_z_relative = p.relative_arguments.z;

let (delta_x, new_pos_x) = if is_x_relative {
last_sent_position.x += p.x;
(delta_movement.x, position.x + p.x)
last_sent_position.x += p.pos.x;
(delta_movement.x, position.x + p.pos.x)
} else {
last_sent_position.x = p.x;
(0.0, p.x)
last_sent_position.x = p.pos.x;
(0.0, p.pos.x)
};
let (delta_y, new_pos_y) = if is_y_relative {
last_sent_position.y += p.y;
(delta_movement.y, position.y + p.y)
last_sent_position.y += p.pos.y;
(delta_movement.y, position.y + p.pos.y)
} else {
last_sent_position.y = p.y;
(0.0, p.y)
last_sent_position.y = p.pos.y;
(0.0, p.pos.y)
};
let (delta_z, new_pos_z) = if is_z_relative {
last_sent_position.z += p.z;
(delta_movement.z, position.z + p.z)
last_sent_position.z += p.pos.z;
(delta_movement.z, position.z + p.pos.z)
} else {
last_sent_position.z = p.z;
(0.0, p.z)
last_sent_position.z = p.pos.z;
(0.0, p.pos.z)
};

let mut y_rot = p.y_rot;
Expand Down
Loading

0 comments on commit f3c5bff

Please sign in to comment.