diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index 097ecaf77..896dc6f7b 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -6143,7 +6143,18 @@ impl horizon_client::interaction_input::InteractionWorld for RemoteInputWorld<'_ direction: 0, sequence: 0, })); - self.0.using = None; + // MultiPlayerGameMode.releaseUsingItem also runs `Item.releaseUsing` here: the + // player moves by itself, so a Riptide launch happens on the client. + let hand = self.0.used_hand(); + if let Some((slot, ticks)) = self.0.using.take() + && let Some(hand) = hand + && self + .0 + .stack_in(slot) + .is_some_and(|s| &*s.item == "minecraft:trident") + { + self.0.with_hand(hand, |g| g.release_trident(ticks)); + } } fn start_attack(&mut self) -> bool { self.0.remote_start_attack() diff --git a/crates/horizon-client/src/game/trident.rs b/crates/horizon-client/src/game/trident.rs index 4a4038186..b333156e1 100644 --- a/crates/horizon-client/src/game/trident.rs +++ b/crates/horizon-client/src/game/trident.rs @@ -306,7 +306,12 @@ impl Game<'_> { if !self.in_water_or_rain() || self.riding.is_some() { return; } - self.hurt_held_without_breaking(1); + // `hurtWithoutBreaking` and the sound belong to the server; a server's + // client only launches. + let server_client = self.remote.is_some(); + if !server_client { + self.hurt_held_without_breaking(1); + } // trident_spin_attack_strength: 1.5 + 0.75 per level above the first. let strength = 1.5 + 0.75 * (riptide as f32 - 1.0); let d = view_vector(self.yaw, self.pitch); @@ -339,8 +344,14 @@ impl Game<'_> { p.position.y += moved.y; } } - let sound = format!("minecraft:item.trident.riptide_{}", riptide.min(3)); - self.audio.play(&sound, at, 1.0, 1.0); + if !server_client { + let sound = format!("minecraft:item.trident.riptide_{}", riptide.min(3)); + self.audio.play(&sound, at, 1.0, 1.0); + } + return; + } + // The server throws the trident. + if self.remote.is_some() { return; } // hurtWithoutBreaking (Unbreaking applies), then the thrown copy.