Skip to content

Fix missing recipe labels and red item tint on display panels - #1760

Merged
rubensworks merged 2 commits into
master-26from
fix-display-panel-rendering
Oct 3, 2026
Merged

rubensworks merged 2 commits into
master-26from
fix-display-panel-rendering

Conversation

@rubensworks

Copy link
Copy Markdown
Member

Follow-up to #1757. These are two more rendering bugs I found while checking the rest of the mod for the same kind of color problem.

1. Recipe "Input"/"Output" labels missing on display panels (RecipeValueTypeWorldRenderer)
The labels used CyclopsCore's RGBToInt(255, 255, 255), which returns a color with alpha 0. Text drawn in the world now uses that alpha as-is, so the labels were invisible. They now use addAlphaToColor(..., alpha) like the other value renderers, so they also fade with distance. The "Input" label was also drawn twice, and the duplicate is removed.

2. Items on display panels rendered with a red tint (RenderCable)
Part overlays were given overlay coordinates 0, which maps to the red "hurt" overlay. Items shown on display panels (item, ingredients and recipe values) came out red, e.g. diamonds looked pink. It now passes OverlayTexture.NO_OVERLAY, which the other block entity renderers already use.

How I looked for other cases: I listed every text, drawScaled*, fill, blit-with-color and submitText call in src/main/java (including multi-line calls) and traced the colors held in variables and constants. I also checked which overlay value each block entity renderer passes. Nothing else passes an alpha-less color or a 0 overlay.

Validation:

  • Checked in game with clientdevbridge: a display panel holding a diamond + stick -> diamond sword recipe card showed no labels and red-tinted items before the fix. After it, "Input"/"Output" show and the items have their normal colors.
  • ./gradlew build passes.
  • ./gradlew runGameTestServer: all 1046 required tests pass.

No tests added, since these are rendering-only changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_012i9oqzn77qQ3FmnWc3CTxo


Generated by Claude Code

claude added 2 commits October 3, 2026 13:53
RGBToInt yields alpha 0, which is now fully transparent. Also drop the
duplicated In label draw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012i9oqzn77qQ3FmnWc3CTxo
Part overlays were given overlay coords 0, which maps to the red hurt
overlay instead of OverlayTexture.NO_OVERLAY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012i9oqzn77qQ3FmnWc3CTxo
@rubensworks
rubensworks merged commit 9b64fc8 into master-26 Oct 3, 2026
7 checks passed
@rubensworks
rubensworks deleted the fix-display-panel-rendering branch October 3, 2026 13:55
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 57.772% (+0.006%) from 57.766% — fix-display-panel-rendering into master-26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants