[PR #762] [MERGED] Carry: write the self-drop loot tables a mod registers in code (Chipped's drops all pass) #2787

Closed
opened 2026-11-02 15:59:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/762
Author: @ludovic111
Created: 10/17/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ludovic111

Base: main ← Head: fix/carry-self-drops


📝 Commits (1)

  • d3673b1 Carry: write the self-drop loot table a mod registers in code

📊 Changes

3 files changed (+159 additions, -1 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+38 -0)
📝 crates/horizon-port-pack/src/oracle.rs (+119 -0)
📝 crates/horizon-port-pack/src/pipeline.rs (+2 -1)

📄 Description

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

Brief priority 3: Chipped's failing per-mod checks.

What

Chipped registers its blocks' loot in Java code. Its jar ships 7 loot tables for about 7,000 blocks, so carried over, those blocks dropped nothing in Horizon, while in the NeoForge oracle every one of them drops itself.

horizon-port-pack carry now writes the missing table when a declared block has none in the jar and the oracle shows one of vanilla's two self-drop shapes:

  • dropSelf: every sampled state drops exactly one of the block's item with every tool, and nothing only where the state needs a tool it did not get;
  • createDoorTable: the states where one property has one value drop it (a door's half=lower), and every other state drops nothing with any tool. The entry gets vanilla's match_block condition on that value.

Each table is written in 26.3's shape, the same JSON vanilla 26.3 ships for stone_bricks and oak_door. Anything else, such as two of itself, another item or a partial match, gets no table and stays in the harness's failures.

  • oracle::Block::drops_itself(item) -> Option<SelfDrop> (Always or When(property, value)); the oracle's per-state drops are now read.
  • The carry log line shows N loot tables upgraded (M added).

Result on Chipped 4.0.2 (ATM10's jar, the NeoForge 21.1.259 oracle)

6,843 tables added. On main, a carried Chipped block drops nothing unless it is one of the 7 the jar has a table for. tools/mod_port_harness.py --work <atm10 work> chipped, drops column (passed / compared):

drops
with dropSelf only 138,950 / 149,093
this PR (dropSelf and door tables) 149,093 / 149,093

The other columns are unchanged:

blocks properties sounds shapes placement tags recipes items
passed / compared 6,857 / 6,981 46,212 / 46,443 46,443 / 46,443 46,396 / 46,443 13,548 / 13,714 11,984 / 12,378 6 / 13 6,849 / 6,973

The rest is API work, not carry: 124 blocks with mod classes and no vanilla template (workbenches, DirectionBlock), 231 map colours, and Chipped's workbench recipes.

Checks

  • cargo fmt --all -- --check, cargo clippy -p horizon-port-pack --all-targets -- -D warnings: clean.
  • cargo test -p horizon-port-pack: 23 passed, including drops_itself_is_vanillas_drop_self and a_door_drops_from_its_lower_half.
  • Parity: no harness depends on horizon-port-pack (parity.py --changed-files selects 0).

Needs Ludovic

Nothing. The carried tables stay in the local work folder; nothing is published.

🤖 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/762 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/carry-self-drops` --- ### 📝 Commits (1) - [`d3673b1`](https://github.com/horizon-rust/horizon/commit/d3673b1509f56cf852e35268843773fc82dd1dc8) Carry: write the self-drop loot table a mod registers in code ### 📊 Changes **3 files changed** (+159 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+38 -0) 📝 `crates/horizon-port-pack/src/oracle.rs` (+119 -0) 📝 `crates/horizon-port-pack/src/pipeline.rs` (+2 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Brief priority 3: Chipped's failing per-mod checks. ## What Chipped registers its blocks' loot in Java code. Its jar ships 7 loot tables for about 7,000 blocks, so carried over, those blocks dropped nothing in Horizon, while in the NeoForge oracle every one of them drops itself. `horizon-port-pack carry` now writes the missing table when a declared block has none in the jar and the oracle shows one of vanilla's two self-drop shapes: - **`dropSelf`**: every sampled state drops exactly one of the block's item with every tool, and nothing only where the state needs a tool it did not get; - **`createDoorTable`**: the states where one property has one value drop it (a door's `half=lower`), and every other state drops nothing with any tool. The entry gets vanilla's `match_block` condition on that value. Each table is written in 26.3's shape, the same JSON vanilla 26.3 ships for `stone_bricks` and `oak_door`. Anything else, such as two of itself, another item or a partial match, gets no table and stays in the harness's failures. - `oracle::Block::drops_itself(item) -> Option<SelfDrop>` (`Always` or `When(property, value)`); the oracle's per-state `drops` are now read. - The carry log line shows `N loot tables upgraded (M added)`. ## Result on Chipped 4.0.2 (ATM10's jar, the NeoForge 21.1.259 oracle) 6,843 tables added. On main, a carried Chipped block drops nothing unless it is one of the 7 the jar has a table for. `tools/mod_port_harness.py --work <atm10 work> chipped`, drops column (passed / compared): | | drops | |---|---:| | with `dropSelf` only | 138,950 / 149,093 | | this PR (`dropSelf` and door tables) | **149,093 / 149,093** | The other columns are unchanged: | | blocks | properties | sounds | shapes | placement | tags | recipes | items | |---|---|---|---|---|---|---|---|---| | passed / compared | 6,857 / 6,981 | 46,212 / 46,443 | 46,443 / 46,443 | 46,396 / 46,443 | 13,548 / 13,714 | 11,984 / 12,378 | 6 / 13 | 6,849 / 6,973 | The rest is API work, not carry: 124 blocks with mod classes and no vanilla template (workbenches, `DirectionBlock`), 231 map colours, and Chipped's workbench recipes. ## Checks - `cargo fmt --all -- --check`, `cargo clippy -p horizon-port-pack --all-targets -- -D warnings`: clean. - `cargo test -p horizon-port-pack`: 23 passed, including `drops_itself_is_vanillas_drop_self` and `a_door_drops_from_its_lower_half`. - Parity: no harness depends on `horizon-port-pack` (`parity.py --changed-files` selects 0). ## Needs Ludovic Nothing. The carried tables stay in the local work folder; nothing is published. 🤖 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-02 15:59:03 +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#2787
No description provided.