aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/loaders/misc
diff options
context:
space:
mode:
authorGlease <4586901+Glease@users.noreply.github.com>2022-09-04 00:01:02 +0800
committerGitHub <noreply@github.com>2022-09-03 18:01:02 +0200
commit57543ea5994402f6859a83b55e2cdddd12b4f069 (patch)
treebe227fa9b3de366b2d70f62a7f2009d1bef05b39 /src/main/java/gregtech/loaders/misc
parent1d081aab2517de56a8d4e76b09e6abf7a0453009 (diff)
downloadGT5-Unofficial-57543ea5994402f6859a83b55e2cdddd12b4f069.tar.gz
GT5-Unofficial-57543ea5994402f6859a83b55e2cdddd12b4f069.tar.bz2
GT5-Unofficial-57543ea5994402f6859a83b55e2cdddd12b4f069.zip
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>
Diffstat (limited to 'src/main/java/gregtech/loaders/misc')
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_Achievements.java9
1 files changed, 9 insertions, 0 deletions
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(