[PR #2767] [CLOSED] mobs: the allay flies #4592

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2767
Author: @levzzz5154
Created: 10/27/2026
Status: ❌ Closed

Base: main ← Head: fix/allay-flying


📝 Commits (1)

📊 Changes

2 files changed (+13 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/mobs/allay.rs (+12 -0)
📝 crates/horizon-client/src/mobs/species.rs (+1 -1)

📄 Description

🤖 Opened by levzzz5154's AI agent (Claude Code), not by levzzz5154 himself.

What and why

An allay summoned with its spawn egg stood still and never flew: it fell
like a walking mob when the block under it was broken.

The reason was the species' flying flag: Species::flags lists the ghast,
the phantom and the happy ghast as flying, but not the allay, so the
allay's travel took the walking path, which applies the gravity. The
allay's own setup was already the flying one (its MoveKind::Flying move
control, its NavKind::Flying navigation and the required path length of
48), so only the travel was wrong.

The allay is now among the flying species, and its travel is the flying
one, which does not apply the gravity: the allay hovers and flies, as
vanilla's does.

Fixes #2594

Vanilla reference

  • net.minecraft.world.entity.animal.allay.Allay.travel —
    this.travelFlying(input, this.getSpeed()): the allay's travel is the
    flying one, not the walking one that applies the gravity.
  • net.minecraft.world.entity.animal.allay.Allay's constructor —
    this.moveControl = new FlyingMoveControl<>(this, 20, true).
  • net.minecraft.world.entity.animal.allay.Allay.createNavigation — a
    FlyingPathNavigation with setCanFloat(true) and
    setRequiredPathLength(48.0F).
  • net.minecraft.world.entity.animal.allay.Allay.checkFallDamage — it is
    overridden, so an allay never takes fall damage.

In Horizon the counterpart is LivingEntity.travel, which takes
travel_flying when the species flies and the walking path (the one that
applies Entity.getGravity) otherwise.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on cachyos-x8664, against upstream/main at f00228e76, 4 min 11 s)

Check Result
Scope ✅ 2 files, +13 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 331 passed (17 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 8 s)
tests: horizon-client ✅ 1330 passed (2 min 4 s)
doc tests ✅ 0 passed (30 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 74 affected, to run in CI (--quick): arrow, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, breaking_model, cauldron, command_exec, composter, crafter and 62 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)
cargo test -p horizon-client --lib -- mobs::allay:
test mobs::allay::tests::the_allay_flies ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1201 filtered out

The same test with the fix reverted (the species' flying flag alone
stashed) fails, which is the bug the issue reports:

test mobs::allay::tests::the_allay_flies ... FAILED
thread 'mobs::allay::tests::the_allay_flies' panicked at crates/horizon-client/src/mobs/allay.rs:200:9:
assertion failed: def(Species::Allay).flags(false).flying
test result: FAILED. 0 passed; 1 failed

cargo build -p horizon-client --bin horizon-client and
cargo fmt -p horizon-client are clean.

🤖 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/2767 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/allay-flying` --- ### 📝 Commits (1) - [`41bab78`](https://github.com/horizon-rust/horizon/commit/41bab784a80680477b8cf9ac84eb128708802b8c) mobs: the allay flies ### 📊 Changes **2 files changed** (+13 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/allay.rs` (+12 -0) 📝 `crates/horizon-client/src/mobs/species.rs` (+1 -1) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code), not by levzzz5154 himself. ## What and why An allay summoned with its spawn egg stood still and never flew: it fell like a walking mob when the block under it was broken. The reason was the species' flying flag: `Species::flags` lists the ghast, the phantom and the happy ghast as flying, but not the allay, so the allay's `travel` took the walking path, which applies the gravity. The allay's own setup was already the flying one (its `MoveKind::Flying` move control, its `NavKind::Flying` navigation and the required path length of 48), so only the travel was wrong. The allay is now among the flying species, and its travel is the flying one, which does not apply the gravity: the allay hovers and flies, as vanilla's does. Fixes #2594 ## Vanilla reference - `net.minecraft.world.entity.animal.allay.Allay.travel` — `this.travelFlying(input, this.getSpeed())`: the allay's travel is the flying one, not the walking one that applies the gravity. - `net.minecraft.world.entity.animal.allay.Allay`'s constructor — `this.moveControl = new FlyingMoveControl<>(this, 20, true)`. - `net.minecraft.world.entity.animal.allay.Allay.createNavigation` — a `FlyingPathNavigation` with `setCanFloat(true)` and `setRequiredPathLength(48.0F)`. - `net.minecraft.world.entity.animal.allay.Allay.checkFallDamage` — it is overridden, so an allay never takes fall damage. In Horizon the counterpart is `LivingEntity.travel`, which takes `travel_flying` when the species flies and the walking path (the one that applies `Entity.getGravity`) otherwise. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on cachyos-x8664, against upstream/main at f00228e76, 4 min 11 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +13 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 331 passed (17 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 8 s) | | tests: horizon-client | ✅ 1330 passed (2 min 4 s) | | doc tests | ✅ 0 passed (30 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 74 affected, to run in CI (--quick): arrow, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, breaking_model, cauldron, command_exec, composter, crafter and 62 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | `cargo test -p horizon-client --lib -- mobs::allay`: ``` test mobs::allay::tests::the_allay_flies ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1201 filtered out ``` The same test with the fix reverted (the species' flying flag alone stashed) fails, which is the bug the issue reports: ``` test mobs::allay::tests::the_allay_flies ... FAILED thread 'mobs::allay::tests::the_allay_flies' panicked at crates/horizon-client/src/mobs/allay.rs:200:9: assertion failed: def(Species::Allay).flags(false).flying test result: FAILED. 0 passed; 1 failed ``` `cargo build -p horizon-client --bin horizon-client` and `cargo fmt -p horizon-client` are clean. 🤖 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>
bsakaguchi 2026-11-03 04:18:20 +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#4592
No description provided.