From af3affb467c01ee2880fbbc366ea0420c0580ab8 Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 6 May 2025 09:28:28 -1030 Subject: fix chunk errors when joining a world with a same name but different height --- azalea-client/src/plugins/packet/game/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'azalea-client/src/plugins/packet') diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs index 71766f8b..b301973f 100644 --- a/azalea-client/src/plugins/packet/game/mod.rs +++ b/azalea-client/src/plugins/packet/game/mod.rs @@ -1496,10 +1496,11 @@ impl GamePacketHandler<'_> { pub fn start_configuration(&mut self, _p: &ClientboundStartConfiguration) { debug!("Got start configuration packet"); - as_system::<(Commands, Query<&mut RawConnection>)>( + as_system::<(Commands, Query<(&mut RawConnection, &mut InstanceHolder)>)>( self.ecs, |(mut commands, mut query)| { - let Some(mut raw_conn) = query.get_mut(self.player).ok() else { + let Some((mut raw_conn, mut instance_holder)) = query.get_mut(self.player).ok() + else { warn!("Got start configuration packet but player doesn't have a RawConnection"); return; }; @@ -1515,6 +1516,8 @@ impl GamePacketHandler<'_> { .insert(crate::client::InConfigState) .remove::() .remove::(); + + instance_holder.reset(); }, ); } -- cgit v1.2.3