diff options
author | chochem <40274384+chochem@users.noreply.github.com> | 2023-08-07 00:59:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 01:59:29 +0200 |
commit | 5a40747b964c551404e7d92a3e383bc6d55135c2 (patch) | |
tree | db74446838394a681b04134f1075b9f57ac9573e /src/main | |
parent | 08fea87253544b07e98996decc12d0b2d19c46ca (diff) | |
download | GT5-Unofficial-5a40747b964c551404e7d92a3e383bc6d55135c2.tar.gz GT5-Unofficial-5a40747b964c551404e7d92a3e383bc6d55135c2.tar.bz2 GT5-Unofficial-5a40747b964c551404e7d92a3e383bc6d55135c2.zip |
try to fix AL logging (#2214)
Diffstat (limited to 'src/main')
-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); |