diff options
Diffstat (limited to 'src')
4 files changed, 23 insertions, 5 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java b/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java index 3076455c70..764340af42 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/API/BorosilicateGlass.java @@ -103,8 +103,8 @@ public class BorosilicateGlass { return representatives; } - private static byte checkWithinBound(byte val, byte lo, byte hi) { - return val > hi || val < lo ? -1 : val; + private static Byte checkWithinBound(byte val, byte lo, byte hi) { + return val > hi || val < lo ? null : val; } /** diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java index de5ef59f18..fc490d6109 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaBlastFurnace.java @@ -365,7 +365,8 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock return false; if (this.glassTier < 8) { - for (GT_MetaTileEntity_Hatch hatch : this.mExoticEnergyHatches) { + for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) { + GT_MetaTileEntity_Hatch hatch = this.mExoticEnergyHatches.get(i); if (hatch.getConnectionType() == GT_MetaTileEntity_Hatch.ConnectionType.LASER) { return false; } @@ -373,6 +374,11 @@ public class GT_TileEntity_MegaBlastFurnace extends GT_TileEntity_MegaMultiBlock return false; } } + for (int i = 0; i < this.mEnergyHatches.size(); ++i) { + if (this.glassTier < this.mEnergyHatches.get(i).mTier) { + return false; + } + } } this.mHeatingCapacity = (int) this.getCoilLevel().getHeat() + 100 * (BW_Util.getTier(this.getMaxInputEu()) - 2); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java index 2638f5de7c..3764812689 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaChemicalReactor.java @@ -162,7 +162,8 @@ public class GT_TileEntity_MegaChemicalReactor if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 2, 2, 0) || this.mMaintenanceHatches.size() != 1) return false; if (this.glassTier < 8) { - for (GT_MetaTileEntity_Hatch hatch : this.mExoticEnergyHatches) { + for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) { + GT_MetaTileEntity_Hatch hatch = this.mExoticEnergyHatches.get(i); if (hatch.getConnectionType() == GT_MetaTileEntity_Hatch.ConnectionType.LASER) { return false; } @@ -170,6 +171,11 @@ public class GT_TileEntity_MegaChemicalReactor return false; } } + for (int i = 0; i < this.mEnergyHatches.size(); ++i) { + if (this.glassTier < this.mEnergyHatches.get(i).mTier) { + return false; + } + } } return true; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java index 650e386202..8b498694bd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaOilCracker.java @@ -238,7 +238,8 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa if (!this.checkPiece(STRUCTURE_PIECE_MAIN, 6, 6, 0) || this.mMaintenanceHatches.size() != 1) return false; if (this.glassTier < 8) { - for (GT_MetaTileEntity_Hatch hatch : this.mExoticEnergyHatches) { + for (int i = 0; i < this.mExoticEnergyHatches.size(); ++i) { + GT_MetaTileEntity_Hatch hatch = this.mExoticEnergyHatches.get(i); if (hatch.getConnectionType() == GT_MetaTileEntity_Hatch.ConnectionType.LASER) { return false; } @@ -246,6 +247,11 @@ public class GT_TileEntity_MegaOilCracker extends GT_TileEntity_MegaMultiBlockBa return false; } } + for (int i = 0; i < this.mEnergyHatches.size(); ++i) { + if (this.glassTier < this.mEnergyHatches.get(i).mTier) { + return false; + } + } } return true; |