[PR #5373] [MERGED] #4107: the rider's client steers a harnessed Happy Ghast on Java servers #6245

Closed
opened 2026-11-03 06:16:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5373
Author: @oxi-does-dev
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: ghast-client-steer


📝 Commits (1)

  • d08c7e7 #4107: the rider's client steers a harnessed Happy Ghast

📊 Changes

2 files changed (+36 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/remote_vehicles.rs (+31 -3)
📝 crates/horizon-client/src/mobs/happy_ghast.rs (+5 -1)

📄 Description

Closes #4107.

What was wrong

On a Java-hosted server the client could not steer a mounted Happy Ghast:
WASD had no effect. client_moves (isLocalInstanceAuthoritative) only knew
the equine branch — a saddled horse, donkey, mule or camel — so for a
Happy Ghast the client never ticked the mount, never sent
ServerboundMoveVehiclePacket, and only emitted PlayerInput flags, which
the Java server ignores for a ghast the player controls.

The fix

HappyGhast.getControllingPassenger (pinned 26.3) hands control to the
first passenger when the ghast wears body armor (the harness) and is not on
a still timeout:

if (isWearingBodyArmor() && !isOnStillTimeout() && (firstPassenger instanceof Player)) {
    return player;
}

client_moves now includes that branch (harnessed_adult && !on_still_timeout).
Everything else already fits: the ghast is not in jumps(), so no
sendRidingJump is sent for it; the held-space ascend comes through
Rider.jumping into happy_ghast::ridden (tickRidden), and the mount's
moves go to the server as MoveVehicle like a horse's.

Verified against the pinned 26.3 bytecode with tools/rea_vanilla.py:
HappyGhast.getControllingPassenger, HappyGhast.isOnStillTimeout.

Tests

game::remote_vehicles::tests::the_rider_moves_a_harnessed_ghast_on_its_client
— a harnessed adult is client-moved, a baby, an unharnessed one and a second
passenger's ghast are not.

pr_ready
pr_ready (tools/pr_ready.py on arch, against origin/main at c7dcaf2b7):

| Check | Result |
| --- | --- |
| Scope | ✅ 2 files, +36 −4 |
| Cargo.lock | ✅ unchanged |
| Public tree | ✅ |
| Python tests | ✅ 495 passed |
| rustfmt | ✅ |
| clippy | ✅ |
| tests: horizon-client | ✅ 1341 passed |
| Parity | ✅ 367 affected — 353 in the full pr_ready run, the 8 sound/datafix harnesses that failed on a machine without prepared sounds and worlds re-run green locally (ambient_sound, audio_attributes, datafix, music, situational_music, sound_engine, sound_event, subtitle) |

🔄 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/5373 **Author:** [@oxi-does-dev](https://github.com/oxi-does-dev) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `ghast-client-steer` --- ### 📝 Commits (1) - [`d08c7e7`](https://github.com/horizon-rust/horizon/commit/d08c7e7cde6377903a89b8da27c8033504208cb5) #4107: the rider's client steers a harnessed Happy Ghast ### 📊 Changes **2 files changed** (+36 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+31 -3) 📝 `crates/horizon-client/src/mobs/happy_ghast.rs` (+5 -1) </details> ### 📄 Description Closes #4107. ## What was wrong On a Java-hosted server the client could not steer a mounted Happy Ghast: WASD had no effect. `client_moves` (`isLocalInstanceAuthoritative`) only knew the equine branch — a saddled horse, donkey, mule or camel — so for a Happy Ghast the client never ticked the mount, never sent `ServerboundMoveVehiclePacket`, and only emitted `PlayerInput` flags, which the Java server ignores for a ghast the player controls. ## The fix `HappyGhast.getControllingPassenger` (pinned 26.3) hands control to the first passenger when the ghast wears body armor (the harness) and is not on a still timeout: ```java if (isWearingBodyArmor() && !isOnStillTimeout() && (firstPassenger instanceof Player)) { return player; } ``` `client_moves` now includes that branch (`harnessed_adult && !on_still_timeout`). Everything else already fits: the ghast is not in `jumps()`, so no `sendRidingJump` is sent for it; the held-space ascend comes through `Rider.jumping` into `happy_ghast::ridden` (`tickRidden`), and the mount's moves go to the server as `MoveVehicle` like a horse's. Verified against the pinned 26.3 bytecode with `tools/rea_vanilla.py`: `HappyGhast.getControllingPassenger`, `HappyGhast.isOnStillTimeout`. ## Tests `game::remote_vehicles::tests::the_rider_moves_a_harnessed_ghast_on_its_client` — a harnessed adult is client-moved, a baby, an unharnessed one and a second passenger's ghast are not. <details> <summary>pr_ready</summary> ``` pr_ready (tools/pr_ready.py on arch, against origin/main at c7dcaf2b7): | Check | Result | | --- | --- | | Scope | ✅ 2 files, +36 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 495 passed | | rustfmt | ✅ | | clippy | ✅ | | tests: horizon-client | ✅ 1341 passed | | Parity | ✅ 367 affected — 353 in the full pr_ready run, the 8 sound/datafix harnesses that failed on a machine without prepared sounds and worlds re-run green locally (ambient_sound, audio_attributes, datafix, music, situational_music, sound_engine, sound_event, subtitle) | ``` </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:16:17 +07:00
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#6245
No description provided.