[PR #7784] A nautilus charge knocks its target back like vanilla #7820

Open
opened 2026-11-03 07:24:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7784
Author: @xFedeT
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/nautilus-charge-knockback


📝 Commits (1)

  • bd5bd16 A nautilus charge knocks its target back with LivingEntity.knockback

📊 Changes

1 file changed (+62 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/mobs/nautilus.rs (+62 -7)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Fixes #7756

ChargeAttack.dealKnockBack calls body.causeExtraKnockback(target, speedFactor * knockbackForce, ...), i.e. LivingEntity.knockback on the target away from (sin(yaw), -cos(yaw)): scaled by 1 - KNOCKBACK_RESISTANCE, the target's horizontal motion halved, a lift on the ground, needsSync, and the knockback hook. The nautilus sent MobEvent::Push (a raw velocity add) instead.

It now sends MobEvent::Knockback { power, x: sin(yaw), z: -cos(yaw), source }, the same event that already routes to Mob::knockback and knock_back_player. The direction (with Mth.sin/cos of the yaw) and the strength (speedFactor * 2.0) are unchanged; the attacker's own 0.6 slowdown stays.

Test: a_charge_knocks_its_target_back_along_its_facing (needs the vanilla data in .local/, like the other mob world tests). cargo test -p horizon-client-lib --lib nautilus, clippy. Not tried in game.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7784 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/nautilus-charge-knockback` --- ### 📝 Commits (1) - [`bd5bd16`](https://github.com/horizon-rust/horizon/commit/bd5bd166c9df591d92720845f7f0a4101285d93e) A nautilus charge knocks its target back with LivingEntity.knockback ### 📊 Changes **1 file changed** (+62 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/nautilus.rs` (+62 -7) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Fixes #7756 `ChargeAttack.dealKnockBack` calls `body.causeExtraKnockback(target, speedFactor * knockbackForce, ...)`, i.e. `LivingEntity.knockback` on the target away from `(sin(yaw), -cos(yaw))`: scaled by `1 - KNOCKBACK_RESISTANCE`, the target's horizontal motion halved, a lift on the ground, `needsSync`, and the knockback hook. The nautilus sent `MobEvent::Push` (a raw velocity add) instead. It now sends `MobEvent::Knockback { power, x: sin(yaw), z: -cos(yaw), source }`, the same event that already routes to `Mob::knockback` and `knock_back_player`. The direction (with `Mth.sin`/`cos` of the yaw) and the strength (`speedFactor * 2.0`) are unchanged; the attacker's own `0.6` slowdown stays. Test: `a_charge_knocks_its_target_back_along_its_facing` (needs the vanilla data in `.local/`, like the other mob world tests). `cargo test -p horizon-client-lib --lib nautilus`, clippy. Not tried in game. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7820
No description provided.