mirror of
https://github.com/GTNewHorizons/ModTweaker.git
synced 2026-11-26 07:03:05 +00:00
Mek v8
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user