JustEnoughItems icon indicating copy to clipboard operation
JustEnoughItems copied to clipboard

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

Open ICY105 opened this issue 11 months ago • 4 comments

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

ICY105 avatar Mar 04 '24 17:03 ICY105

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[bot] avatar Jun 02 '24 17:06 github-actions[bot]

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?).

JongWasTaken avatar Jun 12 '24 11:06 JongWasTaken

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: https://github.com/SpongePowered/VanillaGradle/issues/69 I'll ping them in the issue there to see what the current status is.

mezz avatar Jun 17 '24 10:06 mezz

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

sshcrack avatar Jul 14 '24 17:07 sshcrack

I might have finally been able to fix this simply, here: https://github.com/mezz/JustEnoughItems/commit/d05376b3e901e918ef1cc51bd864f11e35884995 Please try out JEI version 19.16.4.165 for minecraft 1.21.1 and let me know how it goes.

mezz avatar Sep 03 '24 13:09 mezz

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 avatar Sep 08 '24 11:09 mezz

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/)

mezz avatar Sep 09 '24 02:09 mezz