Closed sisby-folk closed 8 months ago
I think the better place to patch is in ModInfo
: https://github.com/badasintended/wthit/blob/02e897952adf43bbe8fd0af7cbd131a5fc9cd058/src/main/java/mcp/mobius/waila/util/ModInfo.java#L29-L31
can do! one moment.
turns out that spot lets me add the fallback just fine - looking extra nice!
This covers off the case where a mod has the ID
cool-mod
but uses the namespacecool_mod
because dashes aren't legal package names - this usually causes their mod name to show as a namespace in the overlay.It'd be nice to also do:
.orElse(new ModInfo(false, namespace, WordUtils.capitalizeFully(namespace.replace("_", " "), null));
So that even if no mod info is found at all, a friendly similarly-formatted name can be used - But this would require changing the contract such that the return type of
createModInfo
toModInfo
, so I felt it might drag this PR down.