[PR #6850] [MERGED] Port map: the geyser and the container loot components are ported #7142

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

📋 Pull Request Information

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

Base: main ← Head: fix/ledger-classes04-sulfur


📝 Commits (1)

  • 1c70bc7 port map: the geyser and the container loot components are ported

📊 Changes

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

View changed files

📝 tools/port_map/classes-04.tsv (+9 -9)

📄 Description

PotentSulfurBlockEntity is the geyser's block entity. Its gas source is the first block above the sulfur that the gas can leave through (findNoxiousGasSourceBlock), isGeyserPassableBlock decides what the gas passes, getUnobstructedBlockCount how far it reaches, haveLineOfSight what it can see, and getNearbyLivingEntities is the box around the source the nausea and launch tickers read entities in. saveAdditional writes countdown alone and loadAdditional reads it back — eruptionTick is transient — and setLevel seeds eruptionTick with the level's game time while it is still -1.

RandomizableContainerBlockEntity.applyImplicitComponents hands a placed container item's loot table to the block (minecraft:container_loot to LootTable and LootTableSeed), and collectImplicitComponents takes it back when the block is picked up.

tools/port_map/classes-04.tsv called all nine missing:

  • findNoxiousGasSourceBlock — "helper of the geyser gas, not ported". potent_sulfur::find_noxious_gas_source_block (its doc names the method; crates/horizon-client-render/src/potent_sulfur.rs:39).
  • getNearbyLivingEntities — same note. The query box is nearby_living_area (crates/horizon-client/src/game/potent_sulfur.rs:63, used by server_nausea_effect_ticker and the launch ticker).
  • getUnobstructedBlockCount, haveLineOfSight, isGeyserPassableBlock — same note. unobstructed_block_count, have_line_of_sight and is_geyser_passable_block in the same file (:61, :97, :14).
  • loadAdditional — "the eruption timer is not loaded; Horizon keeps only the countdown in NBT". Keeps only the countdown is exactly vanilla: javap shows saveAdditional writing countdown from waitingCountdown and nothing else, and loadAdditional reading it back into the same field. save::decode_block_entity does the same.
  • setLevel — "the eruption timer is not started on load". javap shows setLevel setting eruptionTick = level.getGameTime() while it is -1, and client_tick_potent_sulfur does that (crates/horizon-client/src/game/potent_sulfur.rs:415-421, comment PotentSulfurBlockEntity.setLevel).
  • applyImplicitComponents — "a chest item does not hand its loot table back to the block": block_entity_item::place's Part::Loot arm sets LootTable and LootTableSeed from the item's minecraft:container_loot.
  • collectImplicitComponents — "a container does not save its loot table onto the item it drops": block_entity_item::collect's Part::Loot arm builds minecraft:container_loot from them.

The two container rows also gave minecraft:container_loot as the component name, which the crate's tests already pin (block_entity_item::tests).

Proven:

  • python3 tools/port_ledger.py map-check tools/port_map/classes-04.tsv → 232 rows, no problems.
  • grep -n 'PotentSulfurBlockEntity\.' crates/horizon-client-render/src/potent_sulfur.rs → 14: isGeyserPassableBlock, 39: findNoxiousGasSourceBlock, 61: getUnobstructedBlockCount, 97: haveLineOfSight, each over the fn that ports it
  • grep -n 'PotentSulfurBlockEntity.getNearbyLivingEntities' crates/horizon-client/src/game/potent_sulfur.rs → 63:, over nearby_living_area
  • sed -n '414,422p' crates/horizon-client/src/game/potent_sulfur.rs → // PotentSulfurBlockEntity.setLevel. and if sulfur.eruption_tick == -1 { sulfur.eruption_tick = time; }
  • javap -p -c on PotentSulfurBlockEntity (saveAdditional, loadAdditional, setLevel) → the tag carries countdown only, and setLevel compares eruptionTick against -1 and assigns getGameTime()
  • grep -n 'Part::Loot' crates/horizon-client/src/block_entity_item.rs → 185: (collect, minecraft:container_loot out of LootTable/LootTableSeed) and 405: (place, the other way)

Not proven:

  • I did not run the game: no geyser was watched erupting after a reload, and no container item was picked up and placed to see its loot table survive.
  • The other rows of classes-04.tsv were not re-derived method by method; the verdicts I left alone were checked only for dangling paths, which map-check reports clean.

🔄 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/6850 **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:** `fix/ledger-classes04-sulfur` --- ### 📝 Commits (1) - [`1c70bc7`](https://github.com/horizon-rust/horizon/commit/1c70bc70b8fadbd814fec8ff7f4a059575584a7e) port map: the geyser and the container loot components are ported ### 📊 Changes **1 file changed** (+9 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/classes-04.tsv` (+9 -9) </details> ### 📄 Description `PotentSulfurBlockEntity` is the geyser's block entity. Its gas source is the first block above the sulfur that the gas can leave through (`findNoxiousGasSourceBlock`), `isGeyserPassableBlock` decides what the gas passes, `getUnobstructedBlockCount` how far it reaches, `haveLineOfSight` what it can see, and `getNearbyLivingEntities` is the box around the source the nausea and launch tickers read entities in. `saveAdditional` writes `countdown` alone and `loadAdditional` reads it back — `eruptionTick` is transient — and `setLevel` seeds `eruptionTick` with the level's game time while it is still -1. `RandomizableContainerBlockEntity.applyImplicitComponents` hands a placed container item's loot table to the block (`minecraft:container_loot` to `LootTable` and `LootTableSeed`), and `collectImplicitComponents` takes it back when the block is picked up. `tools/port_map/classes-04.tsv` called all nine missing: - `findNoxiousGasSourceBlock` — "helper of the geyser gas, not ported". `potent_sulfur::find_noxious_gas_source_block` (its doc names the method; `crates/horizon-client-render/src/potent_sulfur.rs:39`). - `getNearbyLivingEntities` — same note. The query box is `nearby_living_area` (`crates/horizon-client/src/game/potent_sulfur.rs:63`, used by `server_nausea_effect_ticker` and the launch ticker). - `getUnobstructedBlockCount`, `haveLineOfSight`, `isGeyserPassableBlock` — same note. `unobstructed_block_count`, `have_line_of_sight` and `is_geyser_passable_block` in the same file (`:61`, `:97`, `:14`). - `loadAdditional` — "the eruption timer is not loaded; Horizon keeps only the countdown in NBT". Keeps only the countdown is exactly vanilla: `javap` shows `saveAdditional` writing `countdown` from `waitingCountdown` and nothing else, and `loadAdditional` reading it back into the same field. `save::decode_block_entity` does the same. - `setLevel` — "the eruption timer is not started on load". `javap` shows `setLevel` setting `eruptionTick = level.getGameTime()` while it is -1, and `client_tick_potent_sulfur` does that (`crates/horizon-client/src/game/potent_sulfur.rs:415-421`, comment `PotentSulfurBlockEntity.setLevel`). - `applyImplicitComponents` — "a chest item does not hand its loot table back to the block": `block_entity_item::place`'s `Part::Loot` arm sets `LootTable` and `LootTableSeed` from the item's `minecraft:container_loot`. - `collectImplicitComponents` — "a container does not save its loot table onto the item it drops": `block_entity_item::collect`'s `Part::Loot` arm builds `minecraft:container_loot` from them. The two container rows also gave `minecraft:container_loot` as the component name, which the crate's tests already pin (`block_entity_item::tests`). **Proven:** - `python3 tools/port_ledger.py map-check tools/port_map/classes-04.tsv` → `232 rows, no problems.` - `grep -n 'PotentSulfurBlockEntity\.' crates/horizon-client-render/src/potent_sulfur.rs` → `14: isGeyserPassableBlock`, `39: findNoxiousGasSourceBlock`, `61: getUnobstructedBlockCount`, `97: haveLineOfSight`, each over the fn that ports it - `grep -n 'PotentSulfurBlockEntity.getNearbyLivingEntities' crates/horizon-client/src/game/potent_sulfur.rs` → `63:`, over `nearby_living_area` - `sed -n '414,422p' crates/horizon-client/src/game/potent_sulfur.rs` → `// PotentSulfurBlockEntity.setLevel.` and `if sulfur.eruption_tick == -1 { sulfur.eruption_tick = time; }` - `javap -p -c` on `PotentSulfurBlockEntity` (`saveAdditional`, `loadAdditional`, `setLevel`) → the tag carries `countdown` only, and `setLevel` compares `eruptionTick` against -1 and assigns `getGameTime()` - `grep -n 'Part::Loot' crates/horizon-client/src/block_entity_item.rs` → `185:` (collect, `minecraft:container_loot` out of `LootTable`/`LootTableSeed`) and `405:` (place, the other way) **Not proven:** - I did not run the game: no geyser was watched erupting after a reload, and no container item was picked up and placed to see its loot table survive. - The other rows of `classes-04.tsv` were not re-derived method by method; the verdicts I left alone were checked only for dangling paths, which `map-check` reports clean. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:34:38 +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#7142
No description provided.