aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpacebuilder2020 <spacebuilder2020@users.noreply.github.com>2022-12-31 03:25:44 -0700
committerGitHub <noreply@github.com>2022-12-31 11:25:44 +0100
commitc45afc21d24c5774b9f24313562517185d792234 (patch)
tree3bb21db901e4174bb901c427c1855df4b1c62199
parent6d2bdf0367ba04ba177222c266ef72fba1f61c32 (diff)
downloadGT5-Unofficial-c45afc21d24c5774b9f24313562517185d792234.tar.gz
GT5-Unofficial-c45afc21d24c5774b9f24313562517185d792234.tar.bz2
GT5-Unofficial-c45afc21d24c5774b9f24313562517185d792234.zip
Add a Null Check to fix server crash (#469)
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java
index d30142acad..19d54a335e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/GregTechMetaTileEntity_MegaAlloyBlastSmelter.java
@@ -458,7 +458,7 @@ public class GregTechMetaTileEntity_MegaAlloyBlastSmelter
public double getCoilDiscount(HeatingCoilLevel lvl) {
// Since there are only 14 tiers (starting from 0), this is what the function is.
- double unRounded = lvl.getTier() / 130.0D;
+ double unRounded = (lvl != null ? lvl.getTier() : 0) / 130.0D;
double rounded = Math.floor(unRounded * 1000) / 1000;
return Math.max(0, rounded);