diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_RecipeConstants.java | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main/java/gregtech/api/util/GT_RecipeConstants.java b/src/main/java/gregtech/api/util/GT_RecipeConstants.java index 3fe386ba24..8a4b0b8022 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeConstants.java +++ b/src/main/java/gregtech/api/util/GT_RecipeConstants.java @@ -158,11 +158,25 @@ public class GT_RecipeConstants { for (int i = 0, mOreDictAltLength = mOreDictAlt.length; i < mOreDictAltLength; i++) { ItemStack[] alts = mOreDictAlt[i]; Object input = inputs[i]; - if (input instanceof ItemStack) + if (input == null) { + GT_Log.err.println( + "addAssemblingLineRecipe " + aResearchItem.getDisplayName() + + " --> " + + aOutput.getUnlocalizedName() + + " there is some null item in that recipe"); + } + if (input instanceof ItemStack) { tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash((ItemStack) input, true, false); - else if (input instanceof ItemStack[]) { + } else if (input instanceof ItemStack[]) { for (ItemStack alt : ((ItemStack[]) input)) { tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(alt, true, false); + if (alt == null) { + GT_Log.err.println( + "addAssemblingLineRecipe " + aResearchItem.getDisplayName() + + " --> " + + aOutput.getUnlocalizedName() + + " there is some null alt item in that recipe"); + } } tPersistentHash *= 31; } else if (input instanceof Object[]objs) { @@ -177,11 +191,6 @@ public class GT_RecipeConstants { tPersistentHash = tPersistentHash * 31 + (objs[0] == null ? "" : objs[0].toString()).hashCode(); tPersistentHash = tPersistentHash * 31 + ((Number) objs[1]).intValue(); } - GT_Log.err.println( - "addAssemblingLineRecipe " + aResearchItem.getDisplayName() - + " --> " - + aOutput.getUnlocalizedName() - + " there is some null item in that recipe"); } tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(aResearchItem, true, false); tPersistentHash = tPersistentHash * 31 + GT_Utility.persistentHash(aOutput, true, false); |