From df9d776ff8e3945ce7d367e6cecb54957ee0fd7a Mon Sep 17 00:00:00 2001 From: Kumpelinus Date: Mon, 21 Jul 2025 22:28:41 +0200 Subject: Add TicksAlive component (#229) * Add TicksAlive component * Rename TicksAlive to TicksConnected * Move component to plugins/tick_counter.rs and add doc comment --- azalea-client/src/plugins/disconnect.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'azalea-client/src/plugins/disconnect.rs') diff --git a/azalea-client/src/plugins/disconnect.rs b/azalea-client/src/plugins/disconnect.rs index 80993476..ab39ba5e 100644 --- a/azalea-client/src/plugins/disconnect.rs +++ b/azalea-client/src/plugins/disconnect.rs @@ -11,7 +11,7 @@ use tracing::info; use super::login::IsAuthenticated; use crate::{ chat_signing, client::JoinedClientBundle, connection::RawConnection, loading::HasClientLoaded, - local_player::InstanceHolder, + local_player::InstanceHolder, tick_counter::TicksConnected, }; pub struct DisconnectPlugin; @@ -72,6 +72,8 @@ pub struct RemoveOnDisconnectBundle { pub is_authenticated: IsAuthenticated, // send ServerboundPlayerLoaded next time we join. pub has_client_loaded: HasClientLoaded, + // TickCounter is reset on reconnect + pub ticks_alive: TicksConnected, } /// A system that removes the several components from our clients when they get -- cgit v1.2.3