[PR #6390] [MERGED] Dry a dolphin out with dry_out, not drowning #6841

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6390
Author: @MSedgeMC
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/dolphin-dry-out


📝 Commits (1)

  • 74ae005 Dry a dolphin out with dry_out, not drowning

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/mobs/aquatic.rs (+3 -1)

📄 Description

Dolphin.tick drains moistness outside water and rain, and at zero:

// javap -p -c on Dolphin
47: invokevirtual getMoistnessLevel
51: ifgt          66
54: aload_0  55: aload_0  56: invokevirtual damageSources
59: invokevirtual DamageSources.dryOut
62: fconst_1  63: invokevirtual hurt:(DamageSource,F)V

Horizon's aquatic tick had the counter and the one-point hit right but used DamageKind::Drown,
so a dolphin that dried out on land died to drowning: the death message, the damage type a mod or
a command names, and any immunity or protection that keys on the type were all the wrong one.

Proven: compile-checked with cargo check -q -p horizon-client-lib --lib on the build VM.

Not proven: not checked in game. The check is a dolphin on land for 2400 ticks (two minutes):
the death message should be the dehydration one, and /damage @e[type=dolphin] 1 minecraft:dry_out
should be the same type.

One deliberate non-change: the rest of that arm was re-read against the bytecode while here - the
hop on land really is a 0.5 upward push plus a random yaw and setOnGround(false), which is what
Horizon already did, so only the damage type is touched.


🔄 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/6390 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/dolphin-dry-out` --- ### 📝 Commits (1) - [`74ae005`](https://github.com/horizon-rust/horizon/commit/74ae0056e8f2f1f692d179a5314a010e26994272) Dry a dolphin out with dry_out, not drowning ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/aquatic.rs` (+3 -1) </details> ### 📄 Description `Dolphin.tick` drains `moistness` outside water and rain, and at zero: ```java // javap -p -c on Dolphin 47: invokevirtual getMoistnessLevel 51: ifgt 66 54: aload_0 55: aload_0 56: invokevirtual damageSources 59: invokevirtual DamageSources.dryOut 62: fconst_1 63: invokevirtual hurt:(DamageSource,F)V ``` Horizon's aquatic tick had the counter and the one-point hit right but used `DamageKind::Drown`, so a dolphin that dried out on land died to drowning: the death message, the damage type a mod or a command names, and any immunity or protection that keys on the type were all the wrong one. **Proven:** compile-checked with `cargo check -q -p horizon-client-lib --lib` on the build VM. **Not proven:** not checked in game. The check is a dolphin on land for 2400 ticks (two minutes): the death message should be the dehydration one, and `/damage @e[type=dolphin] 1 minecraft:dry_out` should be the same type. One deliberate non-change: the rest of that arm was re-read against the bytecode while here - the hop on land really is a 0.5 upward push plus a random yaw and `setOnGround(false)`, which is what Horizon already did, so only the damage type is touched. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:27:49 +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#6841
No description provided.