aboutsummaryrefslogtreecommitdiff
path: root/azalea-client
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-09-30 10:56:34 -0500
committerGitHub <noreply@github.com>2025-09-30 10:56:34 -0500
commit643fcb98c0e6cdc63218dd39960d9053b209d9a6 (patch)
tree6bddb7fe39b8fcc3ab3fb2665574533bb227898a /azalea-client
parenta80d8d1b242430c4a251876fa67bfd26af7a0de9 (diff)
downloadazalea-drasl-643fcb98c0e6cdc63218dd39960d9053b209d9a6.tar.xz
1.21.9 (#235)
* start updating to 25w33a * 1.21.9-pre2 * clippy * cleanup, and fix c_explode and c_player_rotation * mc update should be in Changed section in the changelog * 1.21.9
Diffstat (limited to 'azalea-client')
-rw-r--r--azalea-client/src/plugins/packet/config/mod.rs4
-rw-r--r--azalea-client/src/plugins/packet/game/mod.rs30
-rw-r--r--azalea-client/src/test_utils/simulation.rs4
-rw-r--r--azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs2
-rw-r--r--azalea-client/tests/teleport_movement.rs8
5 files changed, 35 insertions, 13 deletions
diff --git a/azalea-client/src/plugins/packet/config/mod.rs b/azalea-client/src/plugins/packet/config/mod.rs
index e8bb017d..629f9f71 100644
--- a/azalea-client/src/plugins/packet/config/mod.rs
+++ b/azalea-client/src/plugins/packet/config/mod.rs
@@ -57,6 +57,7 @@ pub fn process_packet(ecs: &mut World, player: Entity, packet: &ClientboundConfi
server_links,
clear_dialog,
show_dialog,
+ code_of_conduct,
]
);
}
@@ -231,4 +232,7 @@ impl ConfigPacketHandler<'_> {
pub fn show_dialog(&mut self, p: &ClientboundShowDialog) {
debug!("Got show dialog packet {p:?}");
}
+ pub fn code_of_conduct(&mut self, p: &ClientboundCodeOfConduct) {
+ debug!("Got code of conduct packet {p:?}");
+ }
}
diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs
index ed45ab61..46cfd531 100644
--- a/azalea-client/src/plugins/packet/game/mod.rs
+++ b/azalea-client/src/plugins/packet/game/mod.rs
@@ -182,6 +182,11 @@ pub fn process_packet(ecs: &mut World, player: Entity, packet: &ClientboundGameP
waypoint,
clear_dialog,
show_dialog,
+ debug_block_value,
+ debug_chunk_value,
+ debug_entity_value,
+ debug_event,
+ game_test_highlight_pos,
]
);
}
@@ -730,11 +735,7 @@ impl GamePacketHandler<'_> {
// this is to make sure the same entity velocity update doesn't get sent
// multiple times when in swarms
- let knockback = KnockbackType::Set(Vec3 {
- x: p.delta.xa as f64 / 8000.,
- y: p.delta.ya as f64 / 8000.,
- z: p.delta.za as f64 / 8000.,
- });
+ let knockback = KnockbackType::Set(p.delta.to_vec3());
commands.entity(entity).queue(RelativeEntityUpdate::new(
instance_holder.partial_instance.clone(),
@@ -1228,7 +1229,7 @@ impl GamePacketHandler<'_> {
trace!("Got explode packet {p:?}");
as_system::<MessageWriter<_>>(self.ecs, |mut knockback_events| {
- if let Some(knockback) = p.knockback {
+ if let Some(knockback) = p.player_knockback {
knockback_events.write(KnockbackEvent {
entity: self.player,
knockback: KnockbackType::Set(knockback),
@@ -1564,4 +1565,21 @@ impl GamePacketHandler<'_> {
pub fn show_dialog(&mut self, p: &ClientboundShowDialog) {
debug!("Got show dialog packet {p:?}");
}
+
+ pub fn debug_block_value(&mut self, p: &ClientboundDebugBlockValue) {
+ debug!("Got debug block value packet {p:?}");
+ }
+ pub fn debug_chunk_value(&mut self, p: &ClientboundDebugChunkValue) {
+ debug!("Got debug chunk value packet {p:?}");
+ }
+ pub fn debug_entity_value(&mut self, p: &ClientboundDebugEntityValue) {
+ debug!("Got debug entity value packet {p:?}");
+ }
+
+ pub fn debug_event(&mut self, p: &ClientboundDebugEvent) {
+ debug!("Got debug event packet {p:?}");
+ }
+ pub fn game_test_highlight_pos(&mut self, p: &ClientboundGameTestHighlightPos) {
+ debug!("Got game test highlight pos packet {p:?}");
+ }
}
diff --git a/azalea-client/src/test_utils/simulation.rs b/azalea-client/src/test_utils/simulation.rs
index cb5d9447..8d52177a 100644
--- a/azalea-client/src/test_utils/simulation.rs
+++ b/azalea-client/src/test_utils/simulation.rs
@@ -4,7 +4,7 @@ use azalea_auth::game_profile::GameProfile;
use azalea_block::BlockState;
use azalea_buf::AzaleaWrite;
use azalea_core::{
- delta::PositionDelta8,
+ delta::LpVec3,
game_type::{GameMode, OptionalGameType},
position::{BlockPos, ChunkPos, Vec3},
resource_location::ResourceLocation,
@@ -398,6 +398,6 @@ pub fn make_basic_add_entity(
y_rot: 0,
y_head_rot: 0,
data: 0,
- velocity: PositionDelta8::default(),
+ movement: LpVec3::Zero,
}
}
diff --git a/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs b/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs
index 5acb5f0b..8fa3d925 100644
--- a/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs
+++ b/azalea-client/tests/receive_spawn_entity_and_start_config_packet.rs
@@ -27,7 +27,7 @@ fn test_receive_spawn_entity_and_start_config_packet() {
y_rot: 0,
y_head_rot: 0,
data: 0,
- velocity: Default::default(),
+ movement: Default::default(),
});
simulation.receive_packet(ClientboundStartConfiguration);
diff --git a/azalea-client/tests/teleport_movement.rs b/azalea-client/tests/teleport_movement.rs
index f8f747b0..48fc11d5 100644
--- a/azalea-client/tests/teleport_movement.rs
+++ b/azalea-client/tests/teleport_movement.rs
@@ -1,6 +1,6 @@
use azalea_client::test_utils::prelude::*;
use azalea_core::{
- delta::PositionDelta8,
+ delta::{LpVec3, PositionDelta8},
position::{BlockPos, ChunkPos, Vec3},
};
use azalea_entity::LookDirection;
@@ -117,11 +117,11 @@ fn test_teleport_movement() {
simulation.receive_packet(ClientboundPing { id: 4 });
simulation.receive_packet(ClientboundSetEntityMotion {
id: MinecraftEntityId(0),
- delta: PositionDelta8 {
+ delta: LpVec3::from(Vec3::from(PositionDelta8 {
xa: 0,
ya: -627,
za: 0,
- },
+ })),
});
simulation.receive_packet(ClientboundPing { id: 5 });
simulation.tick();
@@ -147,7 +147,7 @@ fn test_teleport_movement() {
p,
ServerboundGamePacket::MovePlayerPos(p)
if p == &ServerboundMovePlayerPos {
- pos: Vec3::new(10000.5, 69.9216251, 0.5),
+ pos: Vec3::new(10000.5, 69.84691458452664, 0.5),
flags: MoveFlags::default()
}
)