don't register recipes if coremod is present

This commit is contained in:
boubou19 committed 2023-02-07 20:44:54 +01:00
1 parent 2c5c1a28c0
commit 247f366417
3 files changed
+11 -7

No files matched your search

@@ -2,6 +2,7 @@ package net.p455w0rd.wirelesscraftingterminal.common;
import java.io.File;
import cpw.mods.fml.common.*;
import net.minecraft.creativetab.CreativeTabs;
import net.p455w0rd.wirelesscraftingterminal.common.utils.WCTLog;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.NetworkHandler;
@@ -16,12 +17,8 @@ import net.p455w0rd.wirelesscraftingterminal.reference.Reference;
import appeng.api.AEApi;
import appeng.api.features.IWirelessTermHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.LoaderState;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@@ -73,7 +70,9 @@ public class WirelessCraftingTerminal {
long stopwatch = WCTLog.beginSection("Init");
IntegrationRegistry.INSTANCE.init();
WirelessCraftingTerminal.WCTState = LoaderState.INITIALIZATION;
RecipeHandler.loadRecipes(!Reference.WCT_MINETWEAKER_OVERRIDE);
if (!Loader.isModLoaded("dreamcraft")) {
RecipeHandler.loadRecipes(!Reference.WCT_MINETWEAKER_OVERRIDE);
}
AchievementHandler.init();
WCTLog.endSection("Init", stopwatch);
}
@@ -1,5 +1,6 @@
package net.p455w0rd.wirelesscraftingterminal.core.sync.packets;
import cpw.mods.fml.common.Loader;
import net.minecraft.entity.player.EntityPlayer;
import net.p455w0rd.wirelesscraftingterminal.core.sync.WCTPacket;
import net.p455w0rd.wirelesscraftingterminal.core.sync.network.INetworkInfo;
@@ -58,7 +59,9 @@ public class PacketConfigSync extends WCTPacket {
Reference.WCT_MINETWEAKER_OVERRIDE = this.mineTweakerOverride;
ConfigHandler.removeBooster();
ConfigHandler.removeBoosterIcon();
RecipeHandler.loadRecipes(mtChanged);
if (!Loader.isModLoaded("dreamcraft")) {
RecipeHandler.loadRecipes(mtChanged);
}
mtChanged = false;
}
}
@@ -125,7 +125,9 @@ public class ConfigHandler {
}
public static void reloadRecipes() {
RecipeHandler.loadRecipes(mtChanged);
if (!Loader.isModLoaded("dreamcraft")) {
RecipeHandler.loadRecipes(mtChanged);
}
mtChanged = false;
}