diff options
Diffstat (limited to 'src/main/java/me/djtheredstoner/perspectivemod/forge/PerspectiveModTweaker.java')
-rw-r--r-- | src/main/java/me/djtheredstoner/perspectivemod/forge/PerspectiveModTweaker.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/me/djtheredstoner/perspectivemod/forge/PerspectiveModTweaker.java b/src/main/java/me/djtheredstoner/perspectivemod/forge/PerspectiveModTweaker.java index 695f7a2..f5128f0 100644 --- a/src/main/java/me/djtheredstoner/perspectivemod/forge/PerspectiveModTweaker.java +++ b/src/main/java/me/djtheredstoner/perspectivemod/forge/PerspectiveModTweaker.java @@ -1,5 +1,6 @@ package me.djtheredstoner.perspectivemod.forge; +import me.djtheredstoner.perspectivemod.ModCoreInstaller; import me.djtheredstoner.perspectivemod.asm.ClassTransformer; import net.minecraft.launchwrapper.Launch; import net.minecraftforge.common.ForgeVersion; @@ -52,6 +53,17 @@ public class PerspectiveModTweaker implements IFMLLoadingPlugin { @Override public String[] getASMTransformerClass() { + int initialize = ModCoreInstaller.initialize(Launch.minecraftHome, "1.8.9"); + + if (ModCoreInstaller.isErrored() || initialize != 0 && initialize != -1) { + System.out.println("Failed to load Sk1er Modcore - " + initialize + " - " + ModCoreInstaller.getError()); + } + // If true the classes are loaded + if (ModCoreInstaller.isIsRunningModCore()) { + // register ModCore's class transformer + return new String[]{"club.sk1er.mods.core.forge.ClassTransformer", ClassTransformer.class.getName()}; + } + return new String[]{ClassTransformer.class.getName()}; } |