Added recipes to IC2 classic, fixed recipes when using ic2, fixes #158

This commit is contained in:
modmuss50 2015-10-02 21:01:30 +01:00
parent 6a2c1e1c85
commit 146deb0e8b
3 changed files with 1481 additions and 8 deletions

View file

@ -18,8 +18,8 @@ public class CompatManager {
public CompatManager() { public CompatManager() {
registerCompact(CompatModuleWaila.class, "Waila"); registerCompact(CompatModuleWaila.class, "Waila");
registerCompact(RecipesIC2.class, "IC2", !IC2Classic.isIc2ClassicLoaded()); registerCompact(RecipesIC2.class, "IC2", "!IC2-Classic-Spmod");
registerCompact(RecipesIC2Classic.class, IC2Classic.isIc2ClassicLoaded() && ! IC2Classic.isIc2ExpLoaded()); registerCompact(RecipesIC2Classic.class, "IC2-Classic-Spmod");
registerCompact(RecipesBuildcraft.class, "BuildCraft|Core", "IC2"); registerCompact(RecipesBuildcraft.class, "BuildCraft|Core", "IC2");
registerCompact(RecipesThermalExpansion.class, "ThermalExpansion"); registerCompact(RecipesThermalExpansion.class, "ThermalExpansion");
registerCompact(EmcValues.class, "EE3"); registerCompact(EmcValues.class, "EE3");
@ -35,7 +35,7 @@ public class CompatManager {
if(obj instanceof String){ if(obj instanceof String){
String modid = (String) obj; String modid = (String) obj;
if(modid.startsWith("!")){ if(modid.startsWith("!")){
if (Loader.isModLoaded(modid.replace("!", ""))) { if (Loader.isModLoaded(modid.replaceAll("!", ""))) {
return; return;
} }
} else { } else {
@ -44,8 +44,8 @@ public class CompatManager {
} }
} }
} else if(obj instanceof Boolean){ } else if(obj instanceof Boolean){
if(!(Boolean)obj){ Boolean boo = (Boolean) obj;
} if(boo == false){}
return; return;
} }
} }

View file

@ -6,6 +6,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.info.IC2Classic;
import ic2.api.item.IC2Items; import ic2.api.item.IC2Items;
import ic2.api.recipe.RecipeInputOreDict; import ic2.api.recipe.RecipeInputOreDict;
import ic2.api.recipe.Recipes; import ic2.api.recipe.Recipes;
@ -38,6 +39,8 @@ public class RecipesIC2 implements ICompatModule {
@Override @Override
public void init(FMLInitializationEvent event) { public void init(FMLInitializationEvent event) {
if(IC2Classic.isIc2ClassicLoaded())
return;
removeIc2Recipes(); removeIc2Recipes();
addShappedIc2Recipes(); addShappedIc2Recipes();
addTRMaceratorRecipes(); addTRMaceratorRecipes();
@ -49,6 +52,8 @@ public class RecipesIC2 implements ICompatModule {
@Override @Override
public void postInit(FMLPostInitializationEvent event) { public void postInit(FMLPostInitializationEvent event) {
if(IC2Classic.isIc2ClassicLoaded())
return;
//Has to be done later, not sure why //Has to be done later, not sure why
RecipeRemover.removeAnyRecipe(IC2Items.getItem("iridiumPlate")); RecipeRemover.removeAnyRecipe(IC2Items.getItem("iridiumPlate"));
} }

File diff suppressed because it is too large Load diff