mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-11-21 12:52:16 +00:00
Add warning if Mixin did not get initialized
This commit is contained in:
1 parent
e1b148d5c7
commit
ff22e0a7b6
1 file changed
+7
@@ -29,6 +29,7 @@ public class SanityCheck {
|
||||
|
||||
checkConcerningJars(warnings);
|
||||
checkMixinContainer(warnings);
|
||||
checkMixinHasInitialized(warnings);
|
||||
|
||||
if(!warnings.isEmpty()) {
|
||||
// Any throwables we throw here will get caught, so all we can do is warn.
|
||||
@@ -44,6 +45,12 @@ public class SanityCheck {
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkMixinHasInitialized(List<String> warnings) {
|
||||
if(!Launch.blackboard.containsKey("mixin.initialised")) {
|
||||
warnings.add("Mixin has not been initialized! If this is a dev environment, make sure org.spongepowered.asm.launch.MixinTweaker was added via the --tweakClass program argument.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkMixinContainer(List<String> warnings) {
|
||||
String mixinCoreJarName = getJarName(SanityCheck.class.getResource("/io/github/legacymoddingmc/unimixins/mixin/MixinCore.class"));
|
||||
String mixinTweakerJarName = getJarName(SanityCheck.class.getResource("/org/spongepowered/asm/launch/MixinTweaker.class"));
|
||||
|
||||
Reference in new issue
Block a user