Skip to content

feat(RebarTranslator): apply white color to item names if not set#742

Merged
LordIdra merged 1 commit into
pylonmc:masterfrom
ybw0014:fix/item-name-white-translation
May 17, 2026
Merged

feat(RebarTranslator): apply white color to item names if not set#742
LordIdra merged 1 commit into
pylonmc:masterfrom
ybw0014:fix/item-name-white-translation

Conversation

@ybw0014
Copy link
Copy Markdown
Contributor

@ybw0014 ybw0014 commented May 10, 2026

Fixes #741

After fix, removed <white> from item name:
Image_2026-05-10_13-06-01_5v0quhna mkz

Also I changed the Liselette Collector to <lang:pylon.item.liselette_collector.name/>:
Image_2026-05-10_13-09-57_ib5n1rro hzj

Copilot AI review requested due to automatic review settings May 10, 2026 17:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Rebar’s server-side item translation pipeline to ensure translated item display names default to white when no explicit color is set, addressing Issue #741 and allowing <white> to be removed from language files.

Changes:

  • Apply NamedTextColor.WHITE to translated ITEM_NAME components when the rendered component has no color set.
  • Refactor the ITEM_NAME translation block to compute an intermediate result component before final styling is applied.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@LordIdra
Copy link
Copy Markdown
Contributor

I think you forgot to push pylon branch

@ybw0014
Copy link
Copy Markdown
Contributor Author

ybw0014 commented May 10, 2026

I changed pylon language file on my test server directly. If you want I will create pylon PR.

@LordIdra
Copy link
Copy Markdown
Contributor

LordIdra commented May 10, 2026

yeah, that would be good

@Seggan
Copy link
Copy Markdown
Member

Seggan commented May 10, 2026

Why not just wrap it in a root component that is white, like lore does for light gray?

@ybw0014
Copy link
Copy Markdown
Contributor Author

ybw0014 commented May 10, 2026

Why not just wrap it in a root component that is white, like lore does for light gray?

lore needs to handle italic style, but name doesn't

@Seggan
Copy link
Copy Markdown
Member

Seggan commented May 10, 2026

I'd much rather have a solution that's redundant 90% of the time but is simple to understand and maintain than extracting the color or whatever

@LordIdra
Copy link
Copy Markdown
Contributor

I'd much rather have a solution that's redundant 90% of the time but is simple to understand and maintain than extracting the color or whatever

I really don't think it matters, honestly what's here seems simpler than the alternative which indicates to me it's just a matter of taste / what you're used to, also it's a 1-line addition and that file has FAR less readable things than this XD

@LordIdra LordIdra merged commit 09088e6 into pylonmc:master May 17, 2026
6 of 7 checks passed
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.

set item names to white at translation time (instead of in lang files)

4 participants