aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index 63f46e2c1e..2a0733420f 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -558,6 +558,20 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
public static class GT_Recipe_AssemblyLine{
public static final ArrayList<GT_Recipe_AssemblyLine> sAssemblylineRecipes = new ArrayList<GT_Recipe_AssemblyLine>();
+ static {
+ GregTech_API.sFirstWorldTick.add(GT_Recipe_AssemblyLine::checkInvalidRecipes);
+ }
+
+ private static void checkInvalidRecipes() {
+ boolean foundInvalid = false;
+ for (GT_Recipe_AssemblyLine recipe : sAssemblylineRecipes) {
+ if (recipe.getPersistentHash() == 0)
+ foundInvalid = true;
+ }
+ if (foundInvalid)
+ throw new RuntimeException("There are invalid assembly line recipes! Check logs for details!");
+ }
+
public ItemStack mResearchItem;
public int mResearchTime;
public ItemStack[] mInputs;