Fabric-internal metadata is not exposed for quilt mods
quiqueck opened this issue ยท 2 comments
This is an Issue that derives from a discussion over at Your Discord: https://discord.com/channels/817576132726620200/832352441760088105/1000491383104229406
and it is about this crash:
Caused by: java.lang.UnsupportedOperationException: Fabric-internal metadata is not exposed for quilt mods - since only quilt loader itself may use this.
at org.quiltmc.loader.impl.metadata.qmj.QuiltModMetadataWrapperFabric.internalError(QuiltModMetadataWrapperFabric.java:242) ~[quilt-loader-0.17.1-beta.6.jar:?]
at org.quiltmc.loader.impl.metadata.qmj.QuiltModMetadataWrapperFabric.getEntrypoints(QuiltModMetadataWrapperFabric.java:282) ~[quilt-loader-0.17.1-beta.6.jar:?]
at net.minecraft.class_2477.md20069f$lambda$immutableBuild$0$0(class_2477.java:1057) ~[server-intermediary.jar:?]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1092) ~[?:?]
at net.minecraft.class_2477.redirect$ifh000$immutableBuild(class_2477.java:1054) ~[server-intermediary.jar:?]
at net.minecraft.class_2477.method_29429(class_2477.java:45) ~[server-intermediary.jar:?]
at net.minecraft.class_2477.<clinit>(class_2477.java:33) ~[server-intermediary.jar:?]
at net.minecraft.class_2588.method_11025(class_2588.java:49) ~[server-intermediary.jar:?]
at net.minecraft.class_2588.method_27659(class_2588.java:146) ~[server-intermediary.jar:?]
at net.minecraft.class_2561.method_27657(class_2561.java:111) ~[server-intermediary.jar:?]
at net.minecraft.class_5348.getString(class_5348.java:91) ~[server-intermediary.jar:?]
at net.minecraft.class_2561.getString(class_2561.java:50) ~[server-intermediary.jar:?]
at de.ambertation.wunderreich.recipes.ImprinterRecipe.lambda$register$3(ImprinterRecipe.java:110) ~[wunderreich-3.0.13-quilt.jar:?]
which is triggered in my Mod. However that line of code does not touch any FabricMethods whatsoever, but it may be accessing a Chat.Component from another Mod which may in turn cause the exception.
The Code basically creates a Recipe for every Enchantment that is available in the Game. It will then generate a Description based on the Enchantment e
's Name:
MutableComponent mc = Component.translatable(e.getDescriptionId());
For Sorting it will the build a String representation using
String sortable = mc.getString();
This call into getString
will the in turn cause the crash. I am fairly convinced now, that there is nothing I can do (besides catching that exception), and that this might be something breaking in QFAPI?
(for reference, this is the actual call from the crashlog: https://github.com/quiqueck/wunderreich/blob/91fc10a388c8b9eacf10bb71b51902bf3e6b32b4/src/main/java/de/ambertation/wunderreich/recipes/ImprinterRecipe.java#L109)
It's unrelated to both your mod and QFAPI, it's DisFabric
using Fabric launcher internals https://github.com/BRForgers/DisFabric/blob/master/src/main/java/br/com/brforgers/mods/disfabric/mixins/MixinLanguage.java