[PR #7329] [MERGED] port map: rest-008's POI sweep, dye mix and spawn egg are answered #7498

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7329
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/vol-c-rest-008


📝 Commits (5)

  • 6e4b623 port_map: rest-008's POI sweep, dye mix and spawn egg are answered
  • 39436cd port_map: rest-008's item predicates say what the shipped data asks for
  • 82f007f Merge remote-tracking branch 'upstream/main' into HEAD
  • e17e541 Merge main into #7329
  • 1a6ccac Merge main into #7329

📊 Changes

1 file changed (+13 additions, -13 deletions)

View changed files

📝 tools/port_map/rest-008.tsv (+13 -13)

📄 Description

Rows of tools/port_map/rest-008.tsv (149 rows, map-check clean against 26.3): the registries and registry-set builders, SectionPos, Vec3i, the cauldron interactions, DataComponentLookup/DataComponentPatch, and the item predicates.

Verdicts

row was now where
SectionPos.aroundChunk missing inline crates/horizon-client/src/mobs/villager_brain.rs::pois_in_range
DataComponentLookup.findAll missing inline crates/horizon-client/src/game/creatures.rs::Game::dye_color_mix_in_recipes
DataComponentLookup.ComponentStorage.findMatching missing skip:other —

All three were filed missing with an "unsure" note. Each has an answer:

  • SectionPos.aroundChunk is the chunk window a POI sweep walks: pois_in_range goes radius.div_euclid(16) + 1 chunks each way, which is the section box aroundChunk builds. Only the other half of the vanilla use is absent, and the note says so: chunk_pois returns as soon as a chunk is not in the world, so nothing pre-loads the chunks the way ensureLoadedAndValid does.
  • DataComponentLookup.findAll is how DyeColor.findColorMixInRecipes reaches the two-dye recipe. dye_color_mix_in_recipes builds the two-dye grid and asks the recipe manager for it instead of looking recipes up by the components they carry.
  • DataComponentLookup.ComponentStorage.findMatching has no counterpart to port: a spawn egg's type is its own id with _spawn_egg trimmed (creatures.rs::Game::spawn_egg_allowed), so no component is looked up.

Notes repaired

Eleven item-predicate notes now carry the data check. Across the 1866 advancements and the 1447 loot tables of the pinned version, only three item predicates are used: minecraft:enchantments (20 in loot tables, 1 in an advancement), minecraft:map_id (18, all loot tables) and minecraft:jukebox_playable (1). So:

  • AttributeModifiersPredicate.matches, AttributeModifiersPredicate.EntryPredicate.test, BundlePredicate.matches, ContainerPredicate.matches, FireworkExplosionPredicate.FireworkPredicate.test, FireworksPredicate.matches, WritableBookPredicate.matches, WrittenBookPredicate.matches — each keeps the reason it is a gap (advancements.rs::item reads only items, count, the potion_contents and damage components and the enchantments and damage predicates) and now says no shipped data asks for it.
  • JukeboxPlayablePredicate.matches is the one of the nine the data does use, in adventure/play_jukebox_in_meadows, where it is the only test of that match_tool — so with the predicate ignored, any item passes that criterion.
  • DataComponentPatch.forget now names the function its note is about: block_entity_item.rs::place merges the item's explicit components over the block entity's implicit ones, with no pass that strips the implicit ones first.

Checked and left alone: the nine CauldronInteractions rows claiming no FLUID_PICKUP/FLUID_PLACE game event (read Game::use_on_cauldron — awards the stat, sets the block, plays the sound, posts no event), and RegistrySetBuilder's seventeen skip:data rows (bootstrap construction; Horizon reads registry tables).

Map-check:

PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-008.tsv
149 rows, no problems.

Proven: the three flips read at the cite — pois_in_range's chunk loop and chunk_pois's early return, dye_color_mix_in_recipes's two-dye grid through recipes().find, spawn_egg_allowed's trim_end_matches("_spawn_egg") — and the predicate scan, run over every advancement and loot-table file in the client jar, which is where the three ids and their counts come from. Every where cell resolves under map-check.

Not proven: that the eight unused item predicates should stay unported — I kept them missing because a data pack can name one, but a pack's criterion is exactly where they would matter. I also did not run a predicate through the live advancement path to watch a criterion match too broadly.


🔄 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/7329 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/vol-c-rest-008` --- ### 📝 Commits (5) - [`6e4b623`](https://github.com/horizon-rust/horizon/commit/6e4b62320461e72b3351b92bd63e7d9ce73802ee) port_map: rest-008's POI sweep, dye mix and spawn egg are answered - [`39436cd`](https://github.com/horizon-rust/horizon/commit/39436cd3078c8498ee339ec0c463bcad82baa8cb) port_map: rest-008's item predicates say what the shipped data asks for - [`82f007f`](https://github.com/horizon-rust/horizon/commit/82f007f7a372eecf8feefc585a96586726fcdeaf) Merge remote-tracking branch 'upstream/main' into HEAD - [`e17e541`](https://github.com/horizon-rust/horizon/commit/e17e541f4a19b2cf95fdffe050a758942aff544a) Merge main into #7329 - [`1a6ccac`](https://github.com/horizon-rust/horizon/commit/1a6ccac6de0cb695c287e642a8bba6d99732f26c) Merge main into #7329 ### 📊 Changes **1 file changed** (+13 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-008.tsv` (+13 -13) </details> ### 📄 Description Rows of `tools/port_map/rest-008.tsv` (149 rows, map-check clean against 26.3): the registries and registry-set builders, `SectionPos`, `Vec3i`, the cauldron interactions, `DataComponentLookup`/`DataComponentPatch`, and the item predicates. **Verdicts** | row | was | now | where | | --- | --- | --- | --- | | `SectionPos.aroundChunk` | missing | inline | `crates/horizon-client/src/mobs/villager_brain.rs::pois_in_range` | | `DataComponentLookup.findAll` | missing | inline | `crates/horizon-client/src/game/creatures.rs::Game::dye_color_mix_in_recipes` | | `DataComponentLookup.ComponentStorage.findMatching` | missing | skip:other | — | All three were filed `missing` with an "unsure" note. Each has an answer: - `SectionPos.aroundChunk` is the chunk window a POI sweep walks: `pois_in_range` goes `radius.div_euclid(16) + 1` chunks each way, which is the section box `aroundChunk` builds. Only the other half of the vanilla use is absent, and the note says so: `chunk_pois` returns as soon as a chunk is not in the world, so nothing pre-loads the chunks the way `ensureLoadedAndValid` does. - `DataComponentLookup.findAll` is how `DyeColor.findColorMixInRecipes` reaches the two-dye recipe. `dye_color_mix_in_recipes` builds the two-dye grid and asks the recipe manager for it instead of looking recipes up by the components they carry. - `DataComponentLookup.ComponentStorage.findMatching` has no counterpart to port: a spawn egg's type is its own id with `_spawn_egg` trimmed (`creatures.rs::Game::spawn_egg_allowed`), so no component is looked up. **Notes repaired** Eleven item-predicate notes now carry the data check. Across the 1866 advancements and the 1447 loot tables of the pinned version, only three item predicates are used: `minecraft:enchantments` (20 in loot tables, 1 in an advancement), `minecraft:map_id` (18, all loot tables) and `minecraft:jukebox_playable` (1). So: - `AttributeModifiersPredicate.matches`, `AttributeModifiersPredicate.EntryPredicate.test`, `BundlePredicate.matches`, `ContainerPredicate.matches`, `FireworkExplosionPredicate.FireworkPredicate.test`, `FireworksPredicate.matches`, `WritableBookPredicate.matches`, `WrittenBookPredicate.matches` — each keeps the reason it is a gap (`advancements.rs::item` reads only `items`, `count`, the `potion_contents` and `damage` components and the `enchantments` and `damage` predicates) and now says no shipped data asks for it. - `JukeboxPlayablePredicate.matches` is the one of the nine the data does use, in `adventure/play_jukebox_in_meadows`, where it is the only test of that `match_tool` — so with the predicate ignored, any item passes that criterion. - `DataComponentPatch.forget` now names the function its note is about: `block_entity_item.rs::place` merges the item's explicit components over the block entity's implicit ones, with no pass that strips the implicit ones first. Checked and left alone: the nine `CauldronInteractions` rows claiming no `FLUID_PICKUP`/`FLUID_PLACE` game event (read `Game::use_on_cauldron` — awards the stat, sets the block, plays the sound, posts no event), and `RegistrySetBuilder`'s seventeen `skip:data` rows (bootstrap construction; Horizon reads registry tables). Map-check: ``` PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-008.tsv 149 rows, no problems. ``` **Proven:** the three flips read at the cite — `pois_in_range`'s chunk loop and `chunk_pois`'s early return, `dye_color_mix_in_recipes`'s two-dye grid through `recipes().find`, `spawn_egg_allowed`'s `trim_end_matches("_spawn_egg")` — and the predicate scan, run over every advancement and loot-table file in the client jar, which is where the three ids and their counts come from. Every `where` cell resolves under map-check. **Not proven:** that the eight unused item predicates should stay unported — I kept them `missing` because a data pack can name one, but a pack's criterion is exactly where they would matter. I also did not run a predicate through the live advancement path to watch a criterion match too broadly. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:40:10 +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#7498
No description provided.