Closed RubixDev closed 3 months ago
An unexpected null problem oof
Try 78035986bc7fff9ff6c33e1b39dad3e1e21cfb0b (can be applied using jitpack) and see if it works
~Sorry, I'd love to test, but I seem to have just borked my gradle and now it doesn't think net.minecraft
is a package anymore. I hope I get that resolved tomorrow.~
nevermind my dev setup, I just added the mod jar from jitpack to a normal Minecraft instance and that fixed the crash.
so yes, it's working
v0.6.1 introduced this extra check:
https://github.com/Fallen-Breath/conditional-mixin/blob/f805e23d638da3315d41cd45130d9dbd38570cfb/forge/src/main/java/me/fallenbreath/conditionalmixin/api/util/forge/VersionCheckerImpl.java#L19-L22
But when used through the
@Restriction
annotation,ModList.get()
will returnnull
at the time this is called. This causes the game to crash unless the requested mod is present.Example crash
``` [09:04:30] [main/FATAL] [mixin/]: Mixin prepare failed preparing curios.CPacketScrollMixin in inventorio-forge.mixins.json: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException java.lang.NullPointerException: Cannot invoke "net.minecraftforge.fml.ModList.getModFileById(String)" because the return value of "net.minecraftforge.fml.ModList.get()" is null org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: java.lang.NullPointerException: Cannot invoke "net.minecraftforge.fml.ModList.getModFileById(String)" because the return value of "net.minecraftforge.fml.ModList.get()" is null at org.spongepowered.asm.mixin.transformer.MixinInfo.The same might be the case for the
LoadingModList
when called later on, so the best bet is probably to add null checks for both. The same goes for NeoForge.