Repository navigation
Conversation
A held block borrows the atlas material of its placed counterpart, and a torch's texture is emissive there. HeldLightState put out the flame, the smoke and the hand light, but nothing told the material, so under water, or with Toggle Held Lights, the head of the torch still drew as a bright white quad in an otherwise dark scene. The item renderer hook now records whether the held item's lit element is out, the capture samples that per part as it does the block-item layer, and the submitter sends such a part through an atlas cutout material whose emission is zero (EntitySurfaceMode.DOUSED). That material is made on first use from the existing emission-scaled atlas material and dropped when materials reload. Items with no flame to put out, and props outside a hand, are unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Sam Bourne <sbourne@nvidia.com>
Drop a duplicate assertTrue import, align dousedSurfaceMode's parameters, and leave the doused flag to the test class's @AfterEach reset. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Sam Bourne <sbourne@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A held torch whose flame had gone out still looked lit: under water, or with
Toggle Held Lights, the flame, the smoke and the hand light went out, but the
head of the torch drew as a bright white quad in an otherwise dark scene.
A held block borrows the atlas material of its placed counterpart, and a
torch's texture is emissive there.
HeldLightStatedecides whether a helditem's lit element burns, and the flame, the smoke, the hand light and the
held beam consult it, but nothing told the material.
Change
ItemRendererMixinrecords, for the duration of one item render, whether theheld item's lit element is out (
HeldItemEffectsRenderer.isDoused, the sametest that already suppresses the flame).
RemixCapturingConsumersamples that per part as each part opens, as it doesthe block-item layer, because two held items can arrive through one layer.
RemixEntitySubmittersends such a part through an atlas cutout materialwhose emission is zero (
EntitySurfaceMode.DOUSED). It is made on first usefrom the existing emission-scaled atlas material, shared by every doused
part, and dropped when materials reload.
Items with no flame to put out (glowstone, a lantern) and props outside a hand
are unchanged.
Tested
narrowing and for the per-part answer.
the torch-head region of the final image read 0.518 (of 1) with the torch
lit and 0.000 under water with the default rule, where it was a saturated
white quad before. The same with a soul torch, and with Toggle Held Lights
in air (0.005). With flames allowed under water it lights again, and after
going out and relighting the lit image differs from the first at 0.2% of
pixels against its own floor, so the material switches back.
NeoForge.
🤖 Generated with Claude Code