Skip to content

Conversation

@Zorbatron
Copy link
Member

@Zorbatron Zorbatron commented Aug 22, 2025

What

#2672 changed GTFluid.GTMaterialFluid#getLocalizedName() to call getLocalizedKey().get(). This works as it should during normal gameplay, but will always return null while minecraft is loading due to LangKey line 51 this.time == ClientScreenHandler.getTicks(). The time field starts at 0 but while MC is loading, ClientScreenHandler.getTicks() will also be 0 causing it to always return the uninitialized string cache. JEI creates its ingredient filter during loading, so it ends up having an empty string as the display name for all GT material fluids.

Implementation Details

Simply sets the default time field in LangKey to -1 instead of 0, so it will properly translate the key while MC is loading. It will be set to 0 after the first translation is done, so the behavior is the same as before.

Outcome

You can search for fluids in JEI again! 😃

Potential Compatibility Issues

Shouldn't be any.

Related MUI2 PR: CleanroomMC/ModularUI#159

@Zorbatron Zorbatron requested a review from a team as a code owner August 22, 2025 02:01
@Zorbatron Zorbatron added the type: bug Something isn't working label Aug 22, 2025
@Zorbatron Zorbatron merged commit 570018d into master Aug 22, 2025
3 of 4 checks passed
@Zorbatron Zorbatron deleted the zb/fluid-localized-name-fix branch August 22, 2025 03:31
Zorbatron added a commit that referenced this pull request Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants