[GH-ISSUE #2594] allay not flying at all #649

Closed
opened 2026-11-02 15:40:49 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ludovic111 on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2594

what i did:summoned and put an allay using the spawn egg
what happened: the allay stood still and did not fly, i broke the block under and it fell as if it wasnt a flying entity
what i expected: it is supposed to fly around like the vex
horizon version: 0.2.7.5
os,CPU, GPU: windows amd64, ryzen 5 5600, rtx 4060ti 8gb

Reported on Discord by man in #horizon-bugs · Discord thread
Tags: gameplay

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @ludovic111 on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/2594 > what i did:summoned and put an allay using the spawn egg > what happened: the allay stood still and did not fly, i broke the block under and it fell as if it wasnt a flying entity > what i expected: it is supposed to fly around like the vex > horizon version: 0.2.7.5 > os,CPU, GPU: windows amd64, ryzen 5 5600, rtx 4060ti 8gb Reported on Discord by **man** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1564440144273211555) Tags: gameplay <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:40:49 +07:00
Author
Owner

@socksprox commented on GitHub (Oct 27, 2026):

🤖 Agent: Taking this one. Root cause found: vanilla Allay.travel calls travelFlying (a travel with no gravity term), but Horizon dispatches the allay to the ordinary air travel, which applies the 0.08 gravity attribute — so it falls and can't rise. Preparing a PR.

<!-- gh-comment-id:6432021107 --> @socksprox commented on GitHub (Oct 27, 2026): 🤖 Agent: Taking this one. Root cause found: vanilla `Allay.travel` calls `travelFlying` (a travel with no gravity term), but Horizon dispatches the allay to the ordinary air travel, which applies the 0.08 gravity attribute — so it falls and can't rise. Preparing a PR.
Author
Owner

@levzzz5154 commented on GitHub (Oct 27, 2026):

🤖 Agent: fixed in https://github.com/ludovic111/horizon/pull/2767 (fix/allay-flying).

The cause was the species' flying flag: Species::flags listed the ghast,
the phantom and the happy ghast as flying, but not the allay, so the
allay's travel took the walking path, the one that applies
Entity.getGravity. That is why the allay stood still on the ground and
fell when the block under it was broken. The rest of the allay was
already the flying setup (its MoveKind::Flying move control, its
NavKind::Flying navigation, the required path length of 48), so only the
travel was wrong.

Vanilla's allay flies: Allay.travel calls travelFlying(input, this.getSpeed()),
its constructor uses new FlyingMoveControl<>(this, 20, true) and its
navigation is a FlyingPathNavigation with setCanFloat(true).

What I verified:

  • cargo test -p horizon-client --lib -- mobs::allay with the fix:
    test mobs::allay::tests::the_allay_flies ... ok (1 passed, 0 failed).
  • The same test with the fix reverted (the species' flying flag alone
    stashed) fails with
    assertion failed: def(Species::Allay).flags(false).flying
    (0 passed, 1 failed), which is the behaviour the issue reports.
  • cargo build -p horizon-client --bin horizon-client and
    cargo fmt -p horizon-client are clean.
<!-- gh-comment-id:6440699927 --> @levzzz5154 commented on GitHub (Oct 27, 2026): 🤖 Agent: fixed in https://github.com/ludovic111/horizon/pull/2767 (`fix/allay-flying`). The cause was the species' flying flag: `Species::flags` listed the ghast, the phantom and the happy ghast as flying, but not the allay, so the allay's `travel` took the walking path, the one that applies `Entity.getGravity`. That is why the allay stood still on the ground and fell when the block under it was broken. The rest of the allay was already the flying setup (its `MoveKind::Flying` move control, its `NavKind::Flying` navigation, the required path length of 48), so only the travel was wrong. Vanilla's allay flies: `Allay.travel` calls `travelFlying(input, this.getSpeed())`, its constructor uses `new FlyingMoveControl<>(this, 20, true)` and its navigation is a `FlyingPathNavigation` with `setCanFloat(true)`. What I verified: - `cargo test -p horizon-client --lib -- mobs::allay` with the fix: `test mobs::allay::tests::the_allay_flies ... ok` (1 passed, 0 failed). - The same test with the fix reverted (the species' flying flag alone stashed) fails with `assertion failed: def(Species::Allay).flags(false).flying` (0 passed, 1 failed), which is the behaviour the issue reports. - `cargo build -p horizon-client --bin horizon-client` and `cargo fmt -p horizon-client` are clean.
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#649
No description provided.