[PR #7822] Send chicken and parrot flap events to sculk sensors #7844

Open
opened 2026-11-03 07:25:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7822
Author: @TheMrZZ
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/bird-flap-game-events


📝 Commits (1)

  • 16f4e08 Send chicken and parrot flap events to sculk sensors

📊 Changes

8 files changed (+112 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/game/creatures.rs (+13 -2)
📝 crates/horizon-client/src/game/sculk.rs (+2 -3)
📝 crates/horizon-client/src/mobs/farm.rs (+27 -0)
📝 crates/horizon-client/src/mobs/living.rs (+16 -3)
📝 crates/horizon-client/src/mobs/parrot.rs (+20 -5)
📝 tools/command_exec_corpus.py (+31 -0)
📝 tools/port_map/animal-1.tsv (+2 -0)
📝 tools/port_map/game-013.tsv (+1 -0)

📄 Description

🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally.

What and why

Fixes #7816. Chicken and parrot flap movement now activates nearby sculk sensors, including for silent birds. Chicken movement applies the strict flyDist > nextFlap threshold; parrot processing reports when that threshold fires. The movement code emits the flap event after onFlap, and Game dispatches bird flap events using their movement position and source. Existing step and bee/bat event routes retain their dispatch ownership.

The new bird flap sensors command corpus runs chicken/parrot with and without AI. Against fresh official Java 26.3, unchanged main matched 204/256 observations; the fixed build matches 256/256. All 120 per-tick positions (and four initial positions) match. Active birds activate the sensor on tick 6 at power 8 and finish with frequency 1; both NoAI controls stay inactive. Unit tests cover strict threshold equality, advancing once, and silent parrot flaps.

Scope is the bird flap game event and live sensor route; this does not claim generic flight, packet, shoulder or reload parity.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

Official 26.3 Entity.processFlappingMovement calls onFlap then emits FLAP when movement emission permits events. Chicken.isFlapping / Parrot.isFlapping use strict flyDist > nextFlap; their onFlap callbacks set nextFlap = flyDist + flapSpeed / 2. Parrot sound remains subject to Silent; the event is not.

Harness: tools/test_command_exec_parity.py --only 'bird flap sensors', using real Game execution and an official Java 26.3 oracle. Port ledger/map checks included.

Other projects' code

None.

Self-check

pr_ready (tools/pr_ready.py --quick on a local runner, against origin/main at f1d6576b3, 8 min 58 s)

Check Result
Scope ✅ 8 files, +112 −13 (final scope after citation cleanup)
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (50 s)
rustfmt ✅ (5 s)
clippy ✅ (1 min 35 s)
tests: horizon-client, horizon-client-lib ✅ 2187 passed (6 min 13 s)
doc tests ✅ 0 passed (3 s)
content root tests ➖ content root untouched
mod API up to date ✅ (11 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Codex.


🔄 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/7822 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/bird-flap-game-events` --- ### 📝 Commits (1) - [`16f4e08`](https://github.com/horizon-rust/horizon/commit/16f4e08928829af10db50ba32678ca679ed5a620) Send chicken and parrot flap events to sculk sensors ### 📊 Changes **8 files changed** (+112 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/creatures.rs` (+13 -2) 📝 `crates/horizon-client/src/game/sculk.rs` (+2 -3) 📝 `crates/horizon-client/src/mobs/farm.rs` (+27 -0) 📝 `crates/horizon-client/src/mobs/living.rs` (+16 -3) 📝 `crates/horizon-client/src/mobs/parrot.rs` (+20 -5) 📝 `tools/command_exec_corpus.py` (+31 -0) 📝 `tools/port_map/animal-1.tsv` (+2 -0) 📝 `tools/port_map/game-013.tsv` (+1 -0) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why Fixes #7816. Chicken and parrot flap movement now activates nearby sculk sensors, including for silent birds. Chicken movement applies the strict `flyDist > nextFlap` threshold; parrot processing reports when that threshold fires. The movement code emits the flap event after `onFlap`, and `Game` dispatches bird flap events using their movement position and source. Existing step and bee/bat event routes retain their dispatch ownership. The new `bird flap sensors` command corpus runs chicken/parrot with and without AI. Against fresh official Java 26.3, unchanged main matched **204/256** observations; the fixed build matches **256/256**. All 120 per-tick positions (and four initial positions) match. Active birds activate the sensor on tick 6 at power 8 and finish with frequency 1; both NoAI controls stay inactive. Unit tests cover strict threshold equality, advancing once, and silent parrot flaps. Scope is the bird flap game event and live sensor route; this does not claim generic flight, packet, shoulder or reload parity. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference Official 26.3 `Entity.processFlappingMovement` calls `onFlap` then emits `FLAP` when movement emission permits events. `Chicken.isFlapping` / `Parrot.isFlapping` use strict `flyDist > nextFlap`; their `onFlap` callbacks set `nextFlap = flyDist + flapSpeed / 2`. Parrot sound remains subject to `Silent`; the event is not. Harness: `tools/test_command_exec_parity.py --only 'bird flap sensors'`, using real Game execution and an official Java 26.3 oracle. Port ledger/map checks included. ## Other projects' code None. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on a local runner, against origin/main at f1d6576b3, 8 min 58 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +112 −13 (final scope after citation cleanup) | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (50 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (1 min 35 s) | | tests: horizon-client, horizon-client-lib | ✅ 2187 passed (6 min 13 s) | | doc tests | ✅ 0 passed (3 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (11 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Codex](https://openai.com/codex/). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7844
No description provided.