Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.20.1] IModFileInfo is missing issue tracker URL #64

Open
UpcraftLP opened this issue Jan 13, 2024 · 1 comment
Open

[1.20.1] IModFileInfo is missing issue tracker URL #64

UpcraftLP opened this issue Jan 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@UpcraftLP
Copy link

Right now I have to get the issue URL by casting net.minecraftforge.forgespi.language.IModFileInfo to net.minecraftforge.fml.loading.moddiscovery.ModFileInfo to extract the issue URL from it, because IModFileInfo has no getter for that.

ex.

public String getIssuesUrl() {
    var file = ModList.get().getModContainerById("modid").orElseThrow().getModInfo().getOwningFile();
    return file instanceof ModFileInfo info ? info.getIssueURL().toString() : "fallback";
}
@Shadows-of-Fire Shadows-of-Fire added the bug Something isn't working label May 18, 2024
@shartte
Copy link
Contributor

shartte commented Jun 2, 2024

You can also get this via getConfigElement if you really don't wanna cast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants