Skip to content

Localize the config - #148

Open
Ranzuu wants to merge 5 commits into
masterfrom
Ranzu/LocalizeConfig
Open

Localize the config#148
Ranzuu wants to merge 5 commits into
masterfrom
Ranzu/LocalizeConfig

Conversation

@Ranzuu

@Ranzuu Ranzuu commented Jul 7, 2026

Copy link
Copy Markdown

Summary

Localization of the config.
Commentes autogenerated from .tooltip

Before After
Pre Post

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@Ranzuu Ranzuu added the Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison. label Jul 7, 2026
@Ranzuu
Ranzuu requested a review from a team July 7, 2026 12:53
@Ranzuu Ranzuu added the Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison. label Jul 7, 2026
@Ranzuu
Ranzuu marked this pull request as draft July 7, 2026 12:56
Ranzuu added 2 commits July 7, 2026 14:59
- because this is used for the config file still
@Ranzuu
Ranzuu marked this pull request as ready for review July 7, 2026 13:00
modularui2.config.enable_test_overlays=Enable Test Overlays
modularui2.config.enable_test_overlays.tooltip=Enables a test overlay shown on title screen and watermark shown on every GuiContainer.
# modularui2.config.use_rich_tooltips=Enable RichTooltip
# modularui2.config.use_rich_tooltips.tooltip=If true, vanilla tooltip will be replaced with MUI's RichTooltip No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why the commented-out lines?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Because the usage is also commented

//@Config.LangKey("modularui2.config.use_rich_tooltips")
//@Config.Comment("If true, vanilla tooltip will be replaced with MUI's RichTooltip")
//public static boolean replaceVanillaTooltips = false;

/* TODO this currently doesnt work when NEI is installed
@Inject(method = "renderToolTip", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiScreen;drawHoveringText(Ljava/util/List;IILnet/minecraft/client/gui/FontRenderer;)V"), cancellable = true)
public void drawItemTooltip(ItemStack stack, int x, int y, CallbackInfo ci, @Local List<String> textLines) {
if (ModularUIConfig.replaceVanillaTooltips && !textLines.isEmpty()) {
RichTooltip.injectRichTooltip(stack, textLines, x, y);
// Canceling vanilla tooltip rendering
ci.cancel();
}
}
@Inject(method = "drawHoveringText", at = @At("HEAD"), cancellable = true, remap = false)
public void drawTooltip(List<String> textLines, int x, int y, FontRenderer font, CallbackInfo ci) {
if (ModularUIConfig.replaceVanillaTooltips && !textLines.isEmpty()) {
RichTooltip.injectRichTooltip(null, textLines, x, y);
// Canceling vanilla tooltip rendering
ci.cancel();
}
}*/

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

Labels

Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants