[PR #2665] [MERGED] Mount HUD: heart row from the server's max health, jump bar fixes #4521

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2665
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/mount-hud


📝 Commits (1)

  • c4427d2 Size the mount hearts from the server's max health and fix the jump bar

📊 Changes

2 files changed (+51 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game/mounts.rs (+15 -8)
📝 crates/horizon-client/src/game/remote.rs (+36 -0)

📄 Description

What and why

Three small fixes to the HUD shown while riding.

  • Heart row size. The window ignored UpdateAttributes for mobs, so a horse's hearts came from the species default instead of its own rolled maximum health. The client now takes the server's max_health for the mob (base plus modifiers, clamped to the attribute range).
  • Jump bar cooldown. The grey cooldown sprite showed for 10 ticks after every jump. Only the camel and nautilus dash have a jump cooldown; a horse always shows the progress bar, so it no longer switches to the cooldown sprite.
  • Pigs and striders. jumpable_mount only checked the saddle. It now also checks that the mount can jump (horses, camels, nautili), as charge_mount_jump already did, so a saddled pig or strider never shows the jump bar or hides the XP bar.

The camel and nautilus dash cooldown is not synced to the window, so their bar is unchanged.

Vanilla reference

  • Hud.extractVehicleHealth, LivingEntity.getMaxHealth, ClientPacketListener.handleUpdateAttributes.
  • JumpableVehicleBar, PlayerRideableJumping.getJumpCooldown, Camel.getJumpCooldown, AbstractNautilus.getJumpCooldown.
  • LocalPlayer.jumpableVehicle.

Self-check

cargo check -p horizon-client passes.


🔄 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/2665 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mount-hud` --- ### 📝 Commits (1) - [`c4427d2`](https://github.com/horizon-rust/horizon/commit/c4427d2a14b1dd029ea07c1b2437d7668759ad0e) Size the mount hearts from the server's max health and fix the jump bar ### 📊 Changes **2 files changed** (+51 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/mounts.rs` (+15 -8) 📝 `crates/horizon-client/src/game/remote.rs` (+36 -0) </details> ### 📄 Description ## What and why Three small fixes to the HUD shown while riding. - **Heart row size.** The window ignored `UpdateAttributes` for mobs, so a horse's hearts came from the species default instead of its own rolled maximum health. The client now takes the server's `max_health` for the mob (base plus modifiers, clamped to the attribute range). - **Jump bar cooldown.** The grey cooldown sprite showed for 10 ticks after every jump. Only the camel and nautilus dash have a jump cooldown; a horse always shows the progress bar, so it no longer switches to the cooldown sprite. - **Pigs and striders.** `jumpable_mount` only checked the saddle. It now also checks that the mount can jump (horses, camels, nautili), as `charge_mount_jump` already did, so a saddled pig or strider never shows the jump bar or hides the XP bar. The camel and nautilus dash cooldown is not synced to the window, so their bar is unchanged. ## Vanilla reference - `Hud.extractVehicleHealth`, `LivingEntity.getMaxHealth`, `ClientPacketListener.handleUpdateAttributes`. - `JumpableVehicleBar`, `PlayerRideableJumping.getJumpCooldown`, `Camel.getJumpCooldown`, `AbstractNautilus.getJumpCooldown`. - `LocalPlayer.jumpableVehicle`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:17:46 +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#4521
No description provided.