aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-06-25 08:53:36 +0900
committerGitHub <noreply@github.com>2023-06-25 08:53:36 +0900
commitc3e82115e6693d820e6bf2d9ce223b83c041ef92 (patch)
tree6dffaa9b81cc5834d5a54d06b8650f5ec90317b9 /src/main
parenteda9d2770e48e096f5ab1f57f2bf260ccf3e9377 (diff)
downloadGT5-Unofficial-c3e82115e6693d820e6bf2d9ce223b83c041ef92.tar.gz
GT5-Unofficial-c3e82115e6693d820e6bf2d9ce223b83c041ef92.tar.bz2
GT5-Unofficial-c3e82115e6693d820e6bf2d9ce223b83c041ef92.zip
Fix LSC NPE (#72)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
index 6fc0f988f0..846f783f49 100644
--- a/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
+++ b/src/main/java/common/tileentities/GTMTE_LapotronicSuperCapacitor.java
@@ -687,7 +687,7 @@ public class GTMTE_LapotronicSuperCapacitor
// Draw energy from GT hatches
for (GT_MetaTileEntity_Hatch_Energy eHatch : super.mEnergyHatches) {
- if (eHatch == null || eHatch.getBaseMetaTileEntity().isInvalidTileEntity()) {
+ if (eHatch == null || !eHatch.isValid()) {
continue;
}
final long power = getPowerToDraw(eHatch.maxEUInput() * eHatch.maxAmperesIn());
@@ -700,7 +700,7 @@ public class GTMTE_LapotronicSuperCapacitor
// Output energy to GT hatches
for (GT_MetaTileEntity_Hatch_Dynamo eDynamo : super.mDynamoHatches) {
- if (eDynamo == null || eDynamo.getBaseMetaTileEntity().isInvalidTileEntity()) {
+ if (eDynamo == null || !eDynamo.isValid()) {
continue;
}
final long power = getPowerToPush(eDynamo.maxEUOutput() * eDynamo.maxAmperesOut());
@@ -713,7 +713,7 @@ public class GTMTE_LapotronicSuperCapacitor
// Draw energy from TT hatches
for (GT_MetaTileEntity_Hatch_EnergyMulti eHatch : mEnergyHatchesTT) {
- if (eHatch == null || eHatch.getBaseMetaTileEntity().isInvalidTileEntity()) {
+ if (eHatch == null || !eHatch.isValid()) {
continue;
}
final long power = getPowerToDraw(eHatch.maxEUInput() * eHatch.maxAmperesIn());
@@ -726,8 +726,7 @@ public class GTMTE_LapotronicSuperCapacitor
// Output energy to TT hatches
for (GT_MetaTileEntity_Hatch_DynamoMulti eDynamo : mDynamoHatchesTT) {
- if (eDynamo == null || eDynamo.getBaseMetaTileEntity() == null
- || eDynamo.getBaseMetaTileEntity().isInvalidTileEntity()) {
+ if (eDynamo == null || !eDynamo.isValid()) {
continue;
}
final long power = getPowerToPush(eDynamo.maxEUOutput() * eDynamo.maxAmperesOut());
@@ -740,7 +739,7 @@ public class GTMTE_LapotronicSuperCapacitor
// Draw energy from TT Laser hatches
for (GT_MetaTileEntity_Hatch_EnergyTunnel eHatch : mEnergyTunnelsTT) {
- if (eHatch == null || eHatch.getBaseMetaTileEntity().isInvalidTileEntity()) {
+ if (eHatch == null || !eHatch.isValid()) {
continue;
}
final long ttLaserWattage = eHatch.maxEUInput() * eHatch.Amperes - (eHatch.Amperes / 20);
@@ -754,7 +753,7 @@ public class GTMTE_LapotronicSuperCapacitor
// Output energy to TT Laser hatches
for (GT_MetaTileEntity_Hatch_DynamoTunnel eDynamo : mDynamoTunnelsTT) {
- if (eDynamo == null || eDynamo.getBaseMetaTileEntity().isInvalidTileEntity()) {
+ if (eDynamo == null || !eDynamo.isValid()) {
continue;
}
final long ttLaserWattage = eDynamo.maxEUOutput() * eDynamo.Amperes - (eDynamo.Amperes / 20);