From b5adad15eb0bc5efbc225454108ac30de3f7fa84 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Mon, 26 Oct 2026 19:53:42 +0100 Subject: [PATCH] Stop the riptide ground lift at ceilings --- crates/horizon-client/src/game/trident.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/crates/horizon-client/src/game/trident.rs b/crates/horizon-client/src/game/trident.rs index d934e85aa..421bfa13e 100644 --- a/crates/horizon-client/src/game/trident.rs +++ b/crates/horizon-client/src/game/trident.rs @@ -253,8 +253,24 @@ impl Game<'_> { // Player.startAutoSpinAttack(20, 8, stack). p.auto_spin_attack_ticks = 20; p.auto_spin_attack_dmg = 8.0; - if p.ground.on_ground { - p.position.y += 1.2; + } + // `player.move(SELF, (0, 1.1999999, 0))` when on the ground: the lift + // stops at a ceiling. + let lift = self + .player + .as_ref() + .filter(|p| p.ground.on_ground) + .map(|p| p.bounds()); + if let Some(bounds) = lift { + let mut scene = SceneCollisions { + world: &self.world, + binding: self.collision, + subject: None, + }; + let up = Vec3::new(0.0, f64::from(1.1999999f32), 0.0); + let moved = scene.resolve(bounds, up, 0.0, true).unwrap_or(Vec3::ZERO); + if let Some(p) = self.player.as_mut() { + p.position.y += moved.y; } } let sound = format!("minecraft:item.trident.riptide_{}", riptide.min(3));