[PR #7293] [MERGED] port map: game2-008's dye mix, adventure predicate and banner map were already ported #7470

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

📋 Pull Request Information

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

Base: main ← Head: chore/vol-b-game2-008


📝 Commits (2)

  • 1d17e23 port map: five item rows were already ported
  • 1dd0bf6 port map: the destroyed-item and component gaps say what is absent

📊 Changes

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

View changed files

📝 tools/port_map/game2-008.tsv (+12 -12)

📄 Description

Rows of tools/port_map/game2-008.tsv (149 rows, map-check clean against 26.3), items and their components.

Verdicts

row was now where
DyeColor.getMixedColor missing port crates/horizon-client/src/game/creatures.rs::Game::dye_mix
DyeColor.findColorMixInRecipes missing port crates/horizon-client/src/game/creatures.rs::Game::dye_color_mix_in_recipes
ItemStack.canBreakBlockInAdventureMode missing port crates/horizon-client/src/game/game_mode.rs::Game::adventure_predicate
MapItem.useOn missing port crates/horizon-client/src/game/maps.rs::Game::use_map_on_banner
JukeboxSongPlayer.setSongWithoutPlaying missing inline crates/horizon-client/src/save.rs::decode_block_entity

The notes said Horizon had no breeding dye mix, did not read the can_break component and had no banner toggle. The tree says otherwise:

  • dye_mix takes the colour of the crafting recipe that mixes the two dyes, else one of them at random, and creatures.rs:3153, :3176 and :3222 give the offspring of a sheep, wolf or cat its colour with it. dye_color_mix_in_recipes lays the two dyes out as a 2x2 grid through Recipes::find and reads the result back by its _dye suffix.
  • adventure_predicate matches the main-hand stack's can_break (one predicate or a list; block ids or tags; exact or ranged state properties; a predicate with nbt or components never matches) and game_mode.rs:200/:205 call it for breaking and placing.
  • use_map_on_banner is MapItem.useOn: on a block in minecraft:banners it toggles the marker through MapData::toggle_banner, a failed toggle ends the use without a swing, and game/remote.rs predicts the same for the client's own map.
  • decode_block_entity restores a jukebox's record and ticks_since_song_started, which is the whole of setSongWithoutPlaying; the song carries on from that tick in tick_jukebox.

Notes repaired — the eight remaining gaps name the missing side:

  • BlockItem.onDestroyed, BundleItem.onDestroyed, ItemUtils.onContainerDestroyed: no onDestroyed anywhere, so a destroyed shulker box or bundle spills nothing.
  • Item.Properties.loweredMobVisibility: mob_visibility is parsed (it is in item_model.rs's component table and the protocol item hash) but no targeting reads it.
  • ItemStack.hurtAndConvertOnBreak: nothing converts a broken carrot on a stick or fungus on a stick into a fishing rod.
  • ItemStack.applyComponentsAndValidate: /item modify has its own path, with no validating counterpart.
  • ItemStack.getDamageSource: a stack's damage_type is used for the enchantment damage tags only; an attack builds its damage from the mob's own Damage.

Map-check:

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

Proven: all five verdicts and the seven rewritten notes; every cited fn resolves under map-check, and each claim is read at the cite (dye_mix's three call sites, adventure_predicate's two callers, use_map_on_banner's toggle, decode_block_entity's jukebox branch).

Not proven: the five ports are not exercised end to end here — nothing shows the offspring colour, the banner toggle or the adventure break reaching a rendered or networked result. The eight gaps stay gaps; none of them is shown to be unportable.


🔄 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/7293 **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-b-game2-008` --- ### 📝 Commits (2) - [`1d17e23`](https://github.com/horizon-rust/horizon/commit/1d17e2339df4ee55916c6721b8da4fd631b2115d) port map: five item rows were already ported - [`1dd0bf6`](https://github.com/horizon-rust/horizon/commit/1dd0bf6b6eb838b6c0803481906baa1338cb8b37) port map: the destroyed-item and component gaps say what is absent ### 📊 Changes **1 file changed** (+12 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game2-008.tsv` (+12 -12) </details> ### 📄 Description Rows of `tools/port_map/game2-008.tsv` (149 rows, map-check clean against 26.3), items and their components. **Verdicts** | row | was | now | where | | --- | --- | --- | --- | | `DyeColor.getMixedColor` | missing | port | `crates/horizon-client/src/game/creatures.rs::Game::dye_mix` | | `DyeColor.findColorMixInRecipes` | missing | port | `crates/horizon-client/src/game/creatures.rs::Game::dye_color_mix_in_recipes` | | `ItemStack.canBreakBlockInAdventureMode` | missing | port | `crates/horizon-client/src/game/game_mode.rs::Game::adventure_predicate` | | `MapItem.useOn` | missing | port | `crates/horizon-client/src/game/maps.rs::Game::use_map_on_banner` | | `JukeboxSongPlayer.setSongWithoutPlaying` | missing | inline | `crates/horizon-client/src/save.rs::decode_block_entity` | The notes said Horizon had no breeding dye mix, did not read the `can_break` component and had no banner toggle. The tree says otherwise: - `dye_mix` takes the colour of the crafting recipe that mixes the two dyes, else one of them at random, and `creatures.rs:3153`, `:3176` and `:3222` give the offspring of a sheep, wolf or cat its colour with it. `dye_color_mix_in_recipes` lays the two dyes out as a 2x2 grid through `Recipes::find` and reads the result back by its `_dye` suffix. - `adventure_predicate` matches the main-hand stack's `can_break` (one predicate or a list; block ids or tags; exact or ranged state properties; a predicate with `nbt` or `components` never matches) and `game_mode.rs:200`/`:205` call it for breaking and placing. - `use_map_on_banner` is `MapItem.useOn`: on a block in `minecraft:banners` it toggles the marker through `MapData::toggle_banner`, a failed toggle ends the use without a swing, and `game/remote.rs` predicts the same for the client's own map. - `decode_block_entity` restores a jukebox's record and `ticks_since_song_started`, which is the whole of `setSongWithoutPlaying`; the song carries on from that tick in `tick_jukebox`. **Notes repaired** — the eight remaining gaps name the missing side: - `BlockItem.onDestroyed`, `BundleItem.onDestroyed`, `ItemUtils.onContainerDestroyed`: no `onDestroyed` anywhere, so a destroyed shulker box or bundle spills nothing. - `Item.Properties.loweredMobVisibility`: `mob_visibility` is parsed (it is in `item_model.rs`'s component table and the protocol item hash) but no targeting reads it. - `ItemStack.hurtAndConvertOnBreak`: nothing converts a broken carrot on a stick or fungus on a stick into a fishing rod. - `ItemStack.applyComponentsAndValidate`: `/item modify` has its own path, with no validating counterpart. - `ItemStack.getDamageSource`: a stack's `damage_type` is used for the enchantment damage tags only; an attack builds its damage from the mob's own `Damage`. Map-check: ``` PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/game2-008.tsv 149 rows, no problems. ``` **Proven:** all five verdicts and the seven rewritten notes; every cited fn resolves under map-check, and each claim is read at the cite (`dye_mix`'s three call sites, `adventure_predicate`'s two callers, `use_map_on_banner`'s toggle, `decode_block_entity`'s jukebox branch). **Not proven:** the five ports are not exercised end to end here — nothing shows the offspring colour, the banner toggle or the adventure break reaching a rendered or networked result. The eight gaps stay gaps; none of them is shown to be unportable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:39:54 +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#7470
No description provided.