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

[Bug]: Common-API is not published with intermediate mappings (Fabric) #3451

Closed
ICY105 opened this issue Mar 4, 2024 · 10 comments
Closed

[Bug]: Common-API is not published with intermediate mappings (Fabric) #3451

ICY105 opened this issue Mar 4, 2024 · 10 comments
Labels

Comments

@ICY105
Copy link

ICY105 commented Mar 4, 2024

Steps to Reproduce the Bug

Implement JEI in a fabric mod that is not using parchment mappings. The fabric example mod is sufficient.

Expected Behavior

Adding JEI to a project should remap the API to your project's mappings.

Actual Behavior

Remapping works for the fabric-api, however the common-api does not have intermediate mappings and is stuck on parchment. For example, the method getPluginUid(), claims to require the return type net.minecraft.resources.ResourceLocation which doesn't exist, instead of net.minecraft.util.Identifier which is the same class under Yarn mappings.

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

No response

latest.log

No response

Copy link

github-actions bot commented Jun 2, 2024

This has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 2, 2024
@JongWasTaken
Copy link

This issue is still not resolved on version 15.3.0.7, making it impossible to use this API with yarn mappings (unless there is a way to remap it by myself?).

@github-actions github-actions bot removed the stale label Jun 12, 2024
@mezz mezz added the bug label Jun 17, 2024
@mezz
Copy link
Owner

mezz commented Jun 17, 2024

Thanks for the report!
I ran into limitations in the tools I use when trying to publish this jar.
I opened an issue with VanillaGradle some time ago here: SpongePowered/VanillaGradle#69
I'll ping them in the issue there to see what the current status is.

@sshcrack
Copy link

So the only way to support JEI is to switch to mojmaps?

@mezz
Copy link
Owner

mezz commented Sep 3, 2024

I might have finally been able to fix this simply, here: d05376b
Please try out JEI version 19.16.4.165 for minecraft 1.21.1 and let me know how it goes.

@mezz mezz closed this as completed Sep 6, 2024
@mezz
Copy link
Owner

mezz commented Sep 8, 2024

This is still an issue but I think I have a way forward.
I have moved off of VanillaGradle and the new toolchain should have a way to support this.

@mezz
Copy link
Owner

mezz commented Sep 9, 2024

This has been fixed in JEI for 1.21.1 (19.17.0+) and 1.20.1 (15.18.0+)
Please depend on the fabric api this way:

modImplementation("mezz.jei:jei-${minecraft_version}-fabric-api:${jei_version}")
modRuntimeOnly("mezz.jei:jei-${minecraft_version}-fabric:${jei_version}")

and it will pull in an intermediary mapping version of common-api automatically.

If you have a multi-project and want to depend on the intermediary mapping version of common-api directly, you can do it with

modImplementation("mezz.jei:jei-${minecraft_version}-common-api-intermediary:${jei_version}")

(all this is visible on the maven, for example here's 1.21.1: https://maven.blamejared.com/mezz/jei/jei-1.21.1-common-api-intermediary/)

@unilock
Copy link

unilock commented Dec 2, 2024

common-api-intermediary v15.20.0.105 (1.20.1) doesn't appear to be mapped to Intermediary...

image

@mezz
Copy link
Owner

mezz commented Dec 2, 2024

Hmm it look fine to me, please check your gradle setup @unilock.
The file is here: https://maven.blamejared.com/mezz/jei/jei-1.20.1-common-api-intermediary/15.20.0.105/jei-1.20.1-common-api-intermediary-15.20.0.105.jar

And here are the contents:
Screenshot 2024-12-02 at 3 51 24 PM

I checked and the source jar looks correct too

@unilock
Copy link

unilock commented Dec 5, 2024

Hmm, decompiling the jar manually does show the correct Intermediary mappings... maybe clearing the Gradle caches would've fixed it? I don't have that development environment set up at the moment, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants