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

Using QM as main mapping and Mojmap as fallback fails to load world on first time run #396

Open
NoComment1105 opened this issue Apr 22, 2022 · 3 comments
Assignees
Labels
bug something isn't working correctly critical a critical PR; bypasses final comment period discussion changes that need discussion before being implemented help wanted extra attention is needed t: toolchain changes to the quilt mappings toolchain

Comments

@NoComment1105
Copy link
Contributor

NoComment1105 commented Apr 22, 2022

While using a buildscript of Quilt Mappings as main and Mojmap as backup, when starting the game for the very first time, Loader fails to appply the transform to make package-private things public.

The mappings configuration i used was this:

dependencies {
    // ...
    mappings(loom.layered {
        officialMojangMappings()
	addLayer quiltMappings.mappings( "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:v2" )
    })
    // ...
}

QM first, mojmap fallback.

If you try to open the game and load a world, with no run/ directory the game with crash with an illegal state exception:
java.lang.IllegalAccessError: failed to access class com.mojang.math.OctahedralGroup$1 from class net.minecraft.util.math.DirectionTransformation (com.mojang.math.OctahedralGroup$1 and net.minecraft.util.math.DirectionTransformation are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @20b12f8a)
Now DirectionTransformation is OctahedralGroup in Quilt Mappings, but loader hasn't worked that out.

If you then close the game, and remove the mojmap fall back, it'll be more than happy to load the world, you can even put mojmap first of use mojmap on it's own and it'll be perfectly happy with it.

Now that you have loaded a world, if you're to add the mojmap fallback back, it will load worlds happily again.

@AlexIIL
Copy link
Contributor

AlexIIL commented Apr 22, 2022

If you add DirectionTransformation.map(null) to your mod initialiser does it also crash early with the same error? It's odd that it only happens on new world creation - but it wouldn't be odd if it only crashed because that's when the method was first called.

@mrsterner
Copy link

I have the same issue when i use mojmap as fallback in 1.19.4

@OroArmor
Copy link
Member

This seems to be an issue with inner classes being "orphaned" by mojmap "overriding" the mapping for the containing class. This is a quilt mappings issue, not a loader or loom issue. I am transferring the issue.

@OroArmor OroArmor transferred this issue from QuiltMC/quilt-loader Mar 20, 2023
@OroArmor OroArmor added bug something isn't working correctly help wanted extra attention is needed t: toolchain changes to the quilt mappings toolchain discussion changes that need discussion before being implemented critical a critical PR; bypasses final comment period labels Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working correctly critical a critical PR; bypasses final comment period discussion changes that need discussion before being implemented help wanted extra attention is needed t: toolchain changes to the quilt mappings toolchain
Projects
None yet
Development

No branches or pull requests

5 participants