diff options
author | Glease <4586901+Glease@users.noreply.github.com> | 2022-01-11 17:46:06 +0800 |
---|---|---|
committer | Glease <4586901+Glease@users.noreply.github.com> | 2022-01-11 17:46:06 +0800 |
commit | 4000858058470080856e9f0b31fa2532b2ff9a48 (patch) | |
tree | 2929150764b84bf1abb57b753cc6534e63828842 /src/main | |
parent | 8fa9bf1a8695c367d6eb1e673aa2293d4cd6b630 (diff) | |
download | GT5-Unofficial-4000858058470080856e9f0b31fa2532b2ff9a48.tar.gz GT5-Unofficial-4000858058470080856e9f0b31fa2532b2ff9a48.tar.bz2 GT5-Unofficial-4000858058470080856e9f0b31fa2532b2ff9a48.zip |
Fix output voiding
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java index 6d8ca49d7d..1ebe328e6d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java @@ -36,7 +36,6 @@ import static gregtech.api.util.GT_StructureUtility.ofHatchAdderOptional; public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_MultiBlockBase { - private short mControllerY = 0; private byte mMode = 0; private boolean mUpgraded = false; private IStructureDefinition<GregtechMetaTileEntity_Adv_DistillationTower> STRUCTURE_DEFINITION = null; @@ -157,7 +156,7 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M .addMaintenanceHatch("Bottom Casing", 1) .addEnergyHatch("Bottom Casing", 1) .addOutputHatch("One per layer except bottom", 2) - .addMufflerHatch("Top Center Casing", 3) + .addMufflerHatch("Top Casing", 3) .toolTipFinisher(CORE.GT_Tooltip_Builder); return tt; } @@ -259,13 +258,17 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M return false; } + private short getControllerY() { + return getBaseMetaTileEntity().getYCoord(); + } + @Override public boolean addOutput(FluidStack aLiquid) { if (aLiquid == null) return false; FluidStack tLiquid = aLiquid.copy(); for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) { if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam() : tHatch.outputsLiquids()) { - if (tHatch.getBaseMetaTileEntity().getYCoord() == this.mControllerY + 1) { + if (tHatch.getBaseMetaTileEntity().getYCoord() == getControllerY() + 1) { int tAmount = tHatch.fill(tLiquid, false); if (tAmount >= tLiquid.amount) { return tHatch.fill(tLiquid, true) >= tLiquid.amount; @@ -282,7 +285,7 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M protected void addFluidOutputs(FluidStack[] mOutputFluids2) { for (int i = 0; i < mOutputFluids2.length; i++) { if (mOutputHatches.size() > i && mOutputHatches.get(i) != null && mOutputFluids2[i] != null && isValidMetaTileEntity(mOutputHatches.get(i))) { - if (mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord() == this.mControllerY + 1 + i) { + if (mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord() == getControllerY() + 1 + i) { mOutputHatches.get(i).fill(mOutputFluids2[i], true); } } @@ -477,5 +480,4 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M aNBT.setBoolean("mUpgraded", mUpgraded); super.setItemNBT(aNBT); } - }
\ No newline at end of file |