From 55a7db13ef028f5b6c6e87a81406b3525cea196f Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 12 Aug 2025 20:50:40 -1030 Subject: send correct packets on teleport --- azalea-client/src/plugins/loading.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-client/src/plugins/loading.rs') diff --git a/azalea-client/src/plugins/loading.rs b/azalea-client/src/plugins/loading.rs index 4e993a4b..86c2b2de 100644 --- a/azalea-client/src/plugins/loading.rs +++ b/azalea-client/src/plugins/loading.rs @@ -1,5 +1,5 @@ use azalea_core::tick::GameTick; -use azalea_entity::{InLoadedChunk, LocalEntity}; +use azalea_entity::{HasClientLoaded, InLoadedChunk, LocalEntity, update_in_loaded_chunk}; use azalea_physics::PhysicsSet; use azalea_protocol::packets::game::ServerboundPlayerLoaded; use bevy_app::{App, Plugin}; @@ -12,8 +12,10 @@ impl Plugin for PlayerLoadedPlugin { fn build(&self, app: &mut App) { app.add_systems( GameTick, + // vanilla runs this on gameMode.tick() player_loaded_packet - .after(PhysicsSet) + .after(update_in_loaded_chunk) + .before(PhysicsSet) .before(MiningSet) .before(crate::movement::send_position), ); @@ -27,8 +29,6 @@ impl Plugin for PlayerLoadedPlugin { // i prefer the client one because it makes it clear that the component is only // present on our own clients -#[derive(Component)] -pub struct HasClientLoaded; #[allow(clippy::type_complexity)] pub fn player_loaded_packet( mut commands: Commands, -- cgit v1.2.3