From 0b76385e5b39b38120e1205f043b74121a5dda5b Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sat, 18 Feb 2017 00:33:49 +0100 Subject: [PATCH] Fixed recipes crashes with invalid mods (IC2 classic) --- src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java b/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java index 6ce5e207..63d9ed48 100644 --- a/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java +++ b/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java @@ -11,6 +11,7 @@ import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import net.minecraft.init.Blocks; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; @@ -310,7 +311,7 @@ public class WarpDriveConfig { WarpDrive.logger.info("Failed to get mod block for " + mod + ":" + id); exception.printStackTrace(); } - return null; + return Blocks.fire; } public static ItemStack getModItemStack(final String mod, final String id, final int meta) { @@ -323,7 +324,7 @@ public class WarpDriveConfig { } catch (Exception exception) { WarpDrive.logger.info("Failed to get mod item for " + mod + ":" + id + "@" + meta); } - return null; + return new ItemStack(Blocks.fire); } public static void onFMLpreInitialization(final String stringConfigDirectory) { @@ -376,7 +377,7 @@ public class WarpDriveConfig { // Recipes RECIPES_ENABLE_DYNAMIC = config.get("recipes", "enable_dynamic", RECIPES_ENABLE_DYNAMIC, - "Mixed recipes dynamically integrating with other mods (Advanced Repulsion Systems, Advanced Solar Panels, IC2, GregTech 5, EnderIO, ThermalExpansion, Immersive Engineering)").getBoolean(true); + "Mixed recipes dynamically integrating with other mods (Advanced Repulsion Systems, Advanced Solar Panels, IC2 experimental, GregTech 5, EnderIO, ThermalExpansion, Immersive Engineering)").getBoolean(true); RECIPES_ENABLE_VANILLA = config.get("recipes", "enable_vanilla", RECIPES_ENABLE_VANILLA, "Vanilla recipes by DarkholmeTenk (you need to disable Dynamic recipes to use those, no longer updated)").getBoolean(false); RECIPES_ENABLE_IC2 = config.get("recipes", "enable_ic2", RECIPES_ENABLE_IC2, "Original recipes based on IndustrialCraft2 by Cr0s (you need to disable Dynamic recipes to use those, no longer updated)").getBoolean(false); RECIPES_ENABLE_HARD_IC2 = config.get("recipes", "enable_hard_ic2", RECIPES_ENABLE_HARD_IC2, "Harder recipes based on IC2 by YuRaNnNzZZ (you need to disable Dynamic recipes to use those)").getBoolean(false);