From 57543ea5994402f6859a83b55e2cdddd12b4f069 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Sun, 4 Sep 2022 00:01:02 +0800 Subject: merge in ASM-ed in changes from gt++ (#1339) * merge in ASM-ed in changes from gt++ * Spotless apply for branch gtpp-asm-merge for #1339 (#1340) Co-authored-by: Glease <4586901+Glease@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/main/java/gregtech/loaders/misc/GT_Achievements.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/gregtech/loaders') diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index c0a89e723c..eb556f0a44 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -367,6 +367,15 @@ public class GT_Achievements { } public Achievement registerAssAchievement(GT_Recipe recipe) { + if (recipe == null) { + GT_Mod.GT_FML_LOGGER.error("Invalid achievement registration attempt for null recipe", new Exception()); + return null; + } + if (recipe.getOutput(0) == null) { + GT_Mod.GT_FML_LOGGER.error( + "Invalid achievement registration attempt for recipe with null output", new Exception()); + return null; + } if (this.achievementList.get(recipe.getOutput(0).getUnlocalizedName()) == null) { assReg++; return registerAchievement( -- cgit