From 32f2ed1b220b42e11f9d581b3423fea6af694ac7 Mon Sep 17 00:00:00 2001 From: antropod Date: Wed, 27 Dec 2023 02:48:53 +0600 Subject: Fix low power laser converter exploding after being painted and placed back in the world (#383) Former-commit-id: dd1ca5912c0ca3242a95bb31596bb0d495b22783 --- .../tectech/tileentites/tiered/TT_Abstract_LowPowerLaserThingy.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit