[PR #5942] [MERGED] Allow spawn eggs to target source fluids #6579

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

📋 Pull Request Information

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

Base: main ← Head: fix/spawn-eggs-on-source-fluids


📝 Commits (1)

  • 278a109 Spawn eggs from source fluid item uses

📊 Changes

6 files changed (+175 additions, -18 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+6 -7)
📝 crates/horizon-client/src/game/creatures.rs (+49 -11)
📝 crates/horizon-client/src/game/lan_actions.rs (+17 -0)
📝 crates/horizon-client/src/game/remote.rs (+5 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java (+12 -0)
➕ tools/test_spawn_egg_fluid_parity.py (+86 -0)

📄 Description

🤖 Opened by oskal675-design's AI agent (Codex, GPT-6.1), not by oskal675-design personally.

What and why

Spawn eggs never reached the fluid-source path of SpawnEggItem.use, so a strider egg aimed at lava did nothing. Use the SOURCE_ONLY fluid ray, spawn at the hit fluid block, and honor adventure placement restrictions and spawn protection. Match client prediction to prevent a successful main-hand egg use from also trying the offhand. Preserve packet-supplied ordinary block use, egg consumption, used statistics and the entity-place event.

Fixes #5870.

Coordinated with @DmytroChup, who agreed to this PR and released the claim.

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

Read actual 26.3 SpawnEggItem.use, SpawnEggItem.useOn, ItemStack.useOn and the spawn/permission paths with tools/rea_vanilla.py.

python3 tools/test_spawn_egg_fluid_parity.py: 10 cases, 30 results match actual vanilla and Horizon servers. Checks spawning, remaining eggs and used statistics for lava/water sources, flowing lava, solid obstructions, waterlogged blocks, creative, adventure with/without placement permission, peaceful monster eggs, and ordinary block use while the previous look targets a mob.

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on omarchy, against origin/main at 07b7ea30d, 3 min 54 s)

Check Result
Scope ✅ 6 files, +175 −18
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 515 passed (23 s)
rustfmt ✅ (5 s)
clippy ✅ (59 s)
tests: horizon-client ✅ 1678 passed (2 min 25 s)
doc tests ✅ 0 passed (1 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 ➖ 317 affected, to run in CI (--quick): blending, block_removal, block_survival, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen, chest_pair and 305 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Also checked the port ledger and the default integrated server in isolated homes: lava use fails before and spawns a strider after; survival consumes exactly one main-hand egg, the offhand egg remains unchanged, and ordinary block use still spawns and consumes one egg.

Screenshots

Before:
Before

After:
After

Maintainer edits are enabled.

🤖 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/5942 **Author:** [@oskal675-design](https://github.com/oskal675-design) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/spawn-eggs-on-source-fluids` --- ### 📝 Commits (1) - [`278a109`](https://github.com/horizon-rust/horizon/commit/278a1093eeb393ca04e4cb202779f06350737826) Spawn eggs from source fluid item uses ### 📊 Changes **6 files changed** (+175 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+6 -7) 📝 `crates/horizon-client/src/game/creatures.rs` (+49 -11) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+17 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+5 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java` (+12 -0) ➕ `tools/test_spawn_egg_fluid_parity.py` (+86 -0) </details> ### 📄 Description > 🤖 Opened by oskal675-design's AI agent (Codex, GPT-6.1), not by oskal675-design personally. ## What and why Spawn eggs never reached the fluid-source path of `SpawnEggItem.use`, so a strider egg aimed at lava did nothing. Use the SOURCE_ONLY fluid ray, spawn at the hit fluid block, and honor adventure placement restrictions and spawn protection. Match client prediction to prevent a successful main-hand egg use from also trying the offhand. Preserve packet-supplied ordinary block use, egg consumption, used statistics and the entity-place event. Fixes #5870. Coordinated with @DmytroChup, who [agreed to this PR and released the claim](https://github.com/horizon-rust/horizon/issues/5870#issuecomment-6558301064). ## 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 Read actual 26.3 `SpawnEggItem.use`, `SpawnEggItem.useOn`, `ItemStack.useOn` and the spawn/permission paths with `tools/rea_vanilla.py`. `python3 tools/test_spawn_egg_fluid_parity.py`: 10 cases, 30 results match actual vanilla and Horizon servers. Checks spawning, remaining eggs and used statistics for lava/water sources, flowing lava, solid obstructions, waterlogged blocks, creative, adventure with/without placement permission, peaceful monster eggs, and ordinary block use while the previous look targets a mob. ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on omarchy, against origin/main at 07b7ea30d, 3 min 54 s) | Check | Result | | --- | --- | | Scope | ✅ 6 files, +175 −18 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 515 passed (23 s) | | rustfmt | ✅ (5 s) | | clippy | ✅ (59 s) | | tests: horizon-client | ✅ 1678 passed (2 min 25 s) | | doc tests | ✅ 0 passed (1 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 | ➖ 317 affected, to run in CI (--quick): blending, block_removal, block_survival, bundle_weight, camera, canyon_carver, carving_geometry, carving_mask, cauldron, cave_carver, chat_screen, chest_pair and 305 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | Also checked the port ledger and the default integrated server in isolated homes: lava use fails before and spawns a strider after; survival consumes exactly one main-hand egg, the offhand egg remains unchanged, and ordinary block use still spawns and consumes one egg. ## Screenshots Before: ![Before](https://raw.githubusercontent.com/oskal675-design/horizon/303a7e4fe145f7a2024c390b55ae04b92d22caec/before.png) After: ![After](https://raw.githubusercontent.com/oskal675-design/horizon/303a7e4fe145f7a2024c390b55ae04b92d22caec/after.png) Maintainer edits are enabled. 🤖 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>
bsakaguchi 2026-11-03 06:23:19 +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#6579
No description provided.