This commit is contained in:
hilburn committed 2015-04-07 23:16:53 +01:00
1 parent cf3ce11fc8
commit 2cc4aff86b
21 files changed
+285 -73

No files matched your search

@@ -1,5 +1,7 @@
package modtweaker2.mods.mekanism;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import minetweaker.MineTweakerAPI;
import modtweaker2.mods.mekanism.gas.GasBracketHandler;
import modtweaker2.mods.mekanism.handlers.ChemicalCrystallizer;
@@ -19,7 +21,10 @@ import modtweaker2.mods.mekanism.handlers.Sawmill;
import modtweaker2.mods.mekanism.handlers.Separator;
import modtweaker2.utils.TweakerPlugin;
import java.util.regex.Pattern;
public class Mekanism extends TweakerPlugin {
public static final boolean v7 = isV7();
public Mekanism() {
MineTweakerAPI.registerBracketHandler(new GasBracketHandler());
MineTweakerAPI.registerClass(Combiner.class);
@@ -38,4 +43,13 @@ public class Mekanism extends TweakerPlugin {
MineTweakerAPI.registerClass(ChemicalOxidizer.class);
MineTweakerAPI.registerClass(ChemicalWasher.class);
}
public static boolean isV7(){
Pattern version = Pattern.compile("7.*");
for (ModContainer loadedMod : Loader.instance().getActiveModList())
{
if (loadedMod.getModId().equals("Mekanism") && version.matcher(loadedMod.getVersion()).find()) return true;
}
return false;
}
}