[PR #408] [MERGED] Render sulfur cube contents and award Uh Oh #2542

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

📋 Pull Request Information

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

Base: main ← Head: fix/sulfur-cube-inner-layer


📝 Commits (6)

  • f5a7959 Draw sulfur cube cores before translucent shells
  • 18e9c14 Render swallowed sulfur cube blocks and award Uh Oh
  • e43e8ae Match sulfur cube block placement, lighting and fuse flashes
  • 938f2ec Merge remote-tracking branch 'origin/main' into fix/sulfur-cube-inner-layer
  • 9223601 Document the sulfur body component limitation
  • 65a6ab7 Merge main into fix/sulfur-cube-inner-layer

📊 Changes

14 files changed (+433 additions, -36 deletions)

View changed files

📝 crates/horizon-client/src/advancements.rs (+92 -1)
📝 crates/horizon-client/src/entities.rs (+2 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+13 -1)
📝 crates/horizon-client/src/game.rs (+7 -1)
📝 crates/horizon-client/src/game/advancements.rs (+13 -0)
📝 crates/horizon-client/src/game/armor_stands.rs (+1 -1)
📝 crates/horizon-client/src/game/creatures.rs (+15 -0)
📝 crates/horizon-client/src/game/minecarts.rs (+25 -7)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)
📝 crates/horizon-client/src/game/spawner.rs (+9 -0)
📝 crates/horizon-client/src/game/sulfur_cubes.rs (+122 -0)
📝 crates/horizon-client/src/mobs/render.rs (+111 -11)
📝 crates/horizon-client/src/models/catalog.rs (+9 -3)
📝 crates/horizon-client/src/save.rs (+13 -11)

📄 Description

Sulfur cubes appeared hollow, swallowed blocks were invisible, and feeding TNT never awarded “Uh Oh.”

Draw the opaque default core before the translucent shell. When a block replaces that core, draw its baked block model in the core’s volume before the shell instead. This covers world and spawner rendering; ordinary mob rendering keeps its existing order. Follow SulfurCubeInnerLayer: X rotation 180°, an extra half-scale for babies, translation (-0.5, -0.518, -0.5), model-selection seed 42, and no contained-block submission for skulls.

Contained blocks now supply transformed face normals for the existing directional-light shader instead of fixed terrain-face brightness. Preserve the entity lightmap, raise block light to the state/quad emission, and apply the interpolated TNT fuse flash (white takes precedence over hurt red). Reference: RenderPipelines.ITEM_SNIPPET, core/item.vsh, SulfurCubeRenderer.extractRenderState and SulfurCubeInnerLayer.submit.

Emit the item/entity advancement events for direct sulfur-cube interactions and for cubes picking up the local player’s dropped items. Evaluate the bundled advancement predicates rather than hardcoding an award. The 26.3 husbandry/uh_oh advancement accepts either TNT path and requires an adult sulfur cube. Dropped items now retain their thrower UUID through save/load; unowned drops do not credit the player, and LAN guest actions do not credit the host.

Validation:

  • Actual prepared adult/baby models through both renderer entry points: default core before shell, existing swallowed-core omission preserved.
  • Focused regressions cover the native adult/baby transform endpoints, interpolated fuse-flash boundaries and hurt precedence, and emitted-light/sky-channel preservation. The existing inverse-transpose normal regression passes.
  • Actual prepared husbandry/uh_oh.json: either criterion completes the advancement; baby cubes, other mobs and ordinary blocks fail the predicates.
  • Item NBT round-trip retains the thrower and removes stale attribution when cleared.
  • Client all-target Clippy with warnings denied, Rust formatting, diff and public-tree checks pass.

Draft for manual testing. Merged current main (9044ae30) and resolved the shared mob-render call with main’s remote-player armor path preserved. No game window or native parity harness was run for these changes. Native method/shader inspection supports the transform, flash and directional lighting; no pixel comparison was run. The existing body slot stores only an item ID, so custom block-state components are not retained. The baked-model helper also does not implement the complete native block-model graph, tint arrays, special renderers or distinct cutout/translucent block-item pipelines. LAN guest advancement delivery remains outside the current local-player advancement implementation. No game artifacts are included.


🔄 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/408 **Author:** [@Online5277](https://github.com/Online5277) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/17/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/sulfur-cube-inner-layer` --- ### 📝 Commits (6) - [`f5a7959`](https://github.com/horizon-rust/horizon/commit/f5a795988ba683a1919fa598cd6d504e65b37a6f) Draw sulfur cube cores before translucent shells - [`18e9c14`](https://github.com/horizon-rust/horizon/commit/18e9c1464275ef54e3d2667897e57726e1985838) Render swallowed sulfur cube blocks and award Uh Oh - [`e43e8ae`](https://github.com/horizon-rust/horizon/commit/e43e8ae82b147e683ba9067a2acb0aa0705169f2) Match sulfur cube block placement, lighting and fuse flashes - [`938f2ec`](https://github.com/horizon-rust/horizon/commit/938f2ec88404a461f994da5d363bb218671ae487) Merge remote-tracking branch 'origin/main' into fix/sulfur-cube-inner-layer - [`9223601`](https://github.com/horizon-rust/horizon/commit/92236010fd4994b3bd9d08f0adb0621d78f733cb) Document the sulfur body component limitation - [`65a6ab7`](https://github.com/horizon-rust/horizon/commit/65a6ab7fa4ef9b2a989434041eb11db9d8047c71) Merge main into fix/sulfur-cube-inner-layer ### 📊 Changes **14 files changed** (+433 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/advancements.rs` (+92 -1) 📝 `crates/horizon-client/src/entities.rs` (+2 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+13 -1) 📝 `crates/horizon-client/src/game.rs` (+7 -1) 📝 `crates/horizon-client/src/game/advancements.rs` (+13 -0) 📝 `crates/horizon-client/src/game/armor_stands.rs` (+1 -1) 📝 `crates/horizon-client/src/game/creatures.rs` (+15 -0) 📝 `crates/horizon-client/src/game/minecarts.rs` (+25 -7) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) 📝 `crates/horizon-client/src/game/spawner.rs` (+9 -0) 📝 `crates/horizon-client/src/game/sulfur_cubes.rs` (+122 -0) 📝 `crates/horizon-client/src/mobs/render.rs` (+111 -11) 📝 `crates/horizon-client/src/models/catalog.rs` (+9 -3) 📝 `crates/horizon-client/src/save.rs` (+13 -11) </details> ### 📄 Description Sulfur cubes appeared hollow, swallowed blocks were invisible, and feeding TNT never awarded “Uh Oh.” Draw the opaque default core before the translucent shell. When a block replaces that core, draw its baked block model in the core’s volume before the shell instead. This covers world and spawner rendering; ordinary mob rendering keeps its existing order. Follow `SulfurCubeInnerLayer`: X rotation 180°, an extra half-scale for babies, translation (-0.5, -0.518, -0.5), model-selection seed 42, and no contained-block submission for skulls. Contained blocks now supply transformed face normals for the existing directional-light shader instead of fixed terrain-face brightness. Preserve the entity lightmap, raise block light to the state/quad emission, and apply the interpolated TNT fuse flash (white takes precedence over hurt red). Reference: `RenderPipelines.ITEM_SNIPPET`, `core/item.vsh`, `SulfurCubeRenderer.extractRenderState` and `SulfurCubeInnerLayer.submit`. Emit the item/entity advancement events for direct sulfur-cube interactions and for cubes picking up the local player’s dropped items. Evaluate the bundled advancement predicates rather than hardcoding an award. The 26.3 `husbandry/uh_oh` advancement accepts either TNT path and requires an adult sulfur cube. Dropped items now retain their thrower UUID through save/load; unowned drops do not credit the player, and LAN guest actions do not credit the host. Validation: - Actual prepared adult/baby models through both renderer entry points: default core before shell, existing swallowed-core omission preserved. - Focused regressions cover the native adult/baby transform endpoints, interpolated fuse-flash boundaries and hurt precedence, and emitted-light/sky-channel preservation. The existing inverse-transpose normal regression passes. - Actual prepared `husbandry/uh_oh.json`: either criterion completes the advancement; baby cubes, other mobs and ordinary blocks fail the predicates. - Item NBT round-trip retains the thrower and removes stale attribution when cleared. - Client all-target Clippy with warnings denied, Rust formatting, diff and public-tree checks pass. Draft for manual testing. Merged current main (9044ae30) and resolved the shared mob-render call with main’s remote-player armor path preserved. No game window or native parity harness was run for these changes. Native method/shader inspection supports the transform, flash and directional lighting; no pixel comparison was run. The existing body slot stores only an item ID, so custom block-state components are not retained. The baked-model helper also does not implement the complete native block-model graph, tint arrays, special renderers or distinct cutout/translucent block-item pipelines. LAN guest advancement delivery remains outside the current local-player advancement implementation. No game artifacts are included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57: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#2542
No description provided.