aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorchochem <40274384+chochem@users.noreply.github.com>2023-08-07 00:59:29 +0100
committerGitHub <noreply@github.com>2023-08-07 01:59:29 +0200
commit5a40747b964c551404e7d92a3e383bc6d55135c2 (patch)
treedb74446838394a681b04134f1075b9f57ac9573e /src/main
parent08fea87253544b07e98996decc12d0b2d19c46ca (diff)
downloadGT5-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.java23
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);