diff --git a/crates/horizon-client/src/game/potions.rs b/crates/horizon-client/src/game/potions.rs index 2ccfd4116..6334ff5ad 100644 --- a/crates/horizon-client/src/game/potions.rs +++ b/crates/horizon-client/src/game/potions.rs @@ -427,9 +427,11 @@ impl Game<'_> { /// `MobEffectInstance.tickClient`): they count down, and the server /// removes them. Their modifiers and flags move the predicted player. pub(super) fn tick_client_effects(&mut self) { - for e in &mut self.potions.effects.list { + // LivingEntity.tickEffects (client): an exhausted effect drops. + self.potions.effects.list.retain_mut(|e| { e.tick_client(); - } + e.duration != 0 + }); self.apply_effect_status(); } /// Add an active effect to the player and update attributes / absorption. diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index 945af4585..47846735a 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -394,6 +394,9 @@ impl Game<'_> { self.carried = None; self.using = None; self.clicks.miss_time = 0; + // A new LocalPlayer has no effects: the server sends what it has + // (ClientboundUpdateMobEffectPacket on placement). + self.potions = Default::default(); self.set_mode_id(0); self.experience = Experience { level: 0,