diff options
author | antropod <antropod@gmail.com> | 2023-12-27 02:48:53 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-26 21:48:53 +0100 |
commit | 32f2ed1b220b42e11f9d581b3423fea6af694ac7 (patch) | |
tree | abc498fb9e4e4fc646e32918cb7631b0c7ec1f6b /src | |
parent | e04e9665ede0a1888cd632030c2c1dbd73729f15 (diff) | |
download | GT5-Unofficial-32f2ed1b220b42e11f9d581b3423fea6af694ac7.tar.gz GT5-Unofficial-32f2ed1b220b42e11f9d581b3423fea6af694ac7.tar.bz2 GT5-Unofficial-32f2ed1b220b42e11f9d581b3423fea6af694ac7.zip |
Fix low power laser converter exploding after being painted and placed back in the world (#383)
Former-commit-id: dd1ca5912c0ca3242a95bb31596bb0d495b22783
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java index e1f69d8c05..ce6c44e1f7 100644 --- a/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java +++ b/src/main/java/com/github/bartimaeusnek/crossmod/tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java @@ -98,7 +98,9 @@ public abstract class TT_Abstract_LowPowerLaserThingy extends GT_MetaTileEntity_ @Override public void loadNBTData(NBTTagCompound nbtTagCompound) { - Optional.ofNullable(nbtTagCompound).ifPresent(tag -> this.AMPERES = tag.getLong("AMPERES")); + if (nbtTagCompound != null && nbtTagCompound.hasKey("AMPERES")) { + this.AMPERES = nbtTagCompound.getLong("AMPERES"); + } } @Override |