[PR #7773] Write aquatic FromBucket defaults and tadpole's true value #7813

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

📋 Pull Request Information

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

Base: main ← Head: fix/aquatic-from-bucket-save


📝 Commits (2)

  • 2e8ddc2 Preserve aquatic FromBucket save values and defaults
  • 148160e Merge main into aquatic FromBucket save fix

📊 Changes

4 files changed (+104 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+74 -3)
📝 crates/horizon-client/src/mobs.rs (+2 -0)
📝 tools/command_exec_corpus.py (+23 -0)
📝 tools/port_map/animal-1.tsv (+5 -2)

📄 Description

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

What and why

Fixes #7763. Cod, salmon, pufferfish, tropical fish and axolotls now always save FromBucket, defaulting to 0b when the flag was absent. Loaded false/true values live in the decoded mob state and survive saving without the original raw NBT. Tadpoles always save 1b, including when loaded with a false flag.

Scope is the entity NBT field. Capture/release, despawn behavior and bucket-item components are separate work.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

Official 26.3 AbstractFish.addAdditionalSaveData / readAdditionalSaveData and axolotl's separate writer/reader unconditionally save the flag and read it with a false default. Tadpole.fromBucket returns true; setFromBucket ignores its argument. Port-map notes now reflect the saved and loaded field.

The new aquatic FromBucket command-execution group runs all six species with absent, false and true inputs. Each isolated subject advances an entity tick before its existence and saved field are queried. Fresh Java 26.3 versus the baseline matches 29/36 observations: all 18 subject checks and 11/18 field checks. The fixed binary matches 36/36. Before/after use identical command scripts and byte-identical Java reference records.

The codec unit fails on old source with cod's missing field and passes after the fix. It covers all 18 inputs, saving both with and without original raw NBT, plus a non-aquatic default control.

Other projects' code

None.

Self-check

pr_ready (tools/pr_ready.py --quick on a local runner, against origin/main at 68ff46998, 6 min 45 s)

Check Result
Scope ✅ 4 files, +104 −5
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (37 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 35 s)
tests: horizon-client-lib ✅ 1476 passed (4 min 25 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
mod API up to date ➖ native hooks untouched
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/7773 **Author:** [@TheMrZZ](https://github.com/TheMrZZ) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/aquatic-from-bucket-save` --- ### 📝 Commits (2) - [`2e8ddc2`](https://github.com/horizon-rust/horizon/commit/2e8ddc24ce9a1f9e5f57af949cbfeb5a9db4ccc8) Preserve aquatic FromBucket save values and defaults - [`148160e`](https://github.com/horizon-rust/horizon/commit/148160e38f16e55cff67d6cb23a400d8eace845d) Merge main into aquatic FromBucket save fix ### 📊 Changes **4 files changed** (+104 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+74 -3) 📝 `crates/horizon-client/src/mobs.rs` (+2 -0) 📝 `tools/command_exec_corpus.py` (+23 -0) 📝 `tools/port_map/animal-1.tsv` (+5 -2) </details> ### 📄 Description > 🤖 Opened by TheMrZZ's AI agent (Codex, gpt-6.1-sol), not by TheMrZZ personally. ## What and why Fixes #7763. Cod, salmon, pufferfish, tropical fish and axolotls now always save `FromBucket`, defaulting to `0b` when the flag was absent. Loaded false/true values live in the decoded mob state and survive saving without the original raw NBT. Tadpoles always save `1b`, including when loaded with a false flag. Scope is the entity NBT field. Capture/release, despawn behavior and bucket-item components are separate work. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference Official 26.3 `AbstractFish.addAdditionalSaveData` / `readAdditionalSaveData` and axolotl's separate writer/reader unconditionally save the flag and read it with a false default. `Tadpole.fromBucket` returns true; `setFromBucket` ignores its argument. Port-map notes now reflect the saved and loaded field. The new `aquatic FromBucket` command-execution group runs all six species with absent, false and true inputs. Each isolated subject advances an entity tick before its existence and saved field are queried. Fresh Java 26.3 versus the baseline matches 29/36 observations: all 18 subject checks and 11/18 field checks. The fixed binary matches 36/36. Before/after use identical command scripts and byte-identical Java reference records. The codec unit fails on old source with cod's missing field and passes after the fix. It covers all 18 inputs, saving both with and without original raw NBT, plus a non-aquatic default control. ## Other projects' code None. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on a local runner, against origin/main at 68ff46998, 6 min 45 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +104 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (37 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 35 s) | | tests: horizon-client-lib | ✅ 1476 passed (4 min 25 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | mod API up to date | ➖ native hooks untouched | | 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#7813
No description provided.