diff options
| author | Dariusz KomosiĆski <darek.komosinski@gmail.com> | 2023-11-13 11:06:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-13 19:06:28 +0900 |
| commit | 75af5c94f30d41a7a525e74db90598d0f0360ce1 (patch) | |
| tree | 356ed473e630a516cfa5770766aac916a6e9c85b | |
| parent | 6f46c2e48ea98428e039f2150eab19fcbaf88124 (diff) | |
| download | GT5-Unofficial-75af5c94f30d41a7a525e74db90598d0f0360ce1.tar.gz GT5-Unofficial-75af5c94f30d41a7a525e74db90598d0f0360ce1.tar.bz2 GT5-Unofficial-75af5c94f30d41a7a525e74db90598d0f0360ce1.zip | |
Fix MDT void protection (#367)
* Update buildscript.
* Implement custom MDT logic for dumping fluid to ME.
* Code cleanup.
Former-commit-id: 37d1e00c283ef1ae8b03150212c3ca425b0ef3b5
| -rw-r--r-- | build.gradle | 7 | ||||
| -rw-r--r-- | src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java | 25 |
2 files changed, 28 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle index e59189c895..f3a7fa2788 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1697697256 +//version: 1699290261 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -646,7 +646,7 @@ repositories { def mixinProviderGroup = "io.github.legacymoddingmc" def mixinProviderModule = "unimixins" -def mixinProviderVersion = "0.1.7.1" +def mixinProviderVersion = "0.1.13" def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}" def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev" ext.mixinProviderSpec = mixinProviderSpec @@ -1187,9 +1187,8 @@ publishing { version = System.getenv("RELEASE_VERSION") ?: identifiedVersion } } - repositories { - if (usesMavenPublishing.toBoolean()) { + if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) { maven { url = mavenPublishUrl allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java index 343a06cece..4644b33dc8 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/mega/GT_TileEntity_MegaDistillTower.java @@ -56,6 +56,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; +import gregtech.common.tileentities.machines.GT_MetaTileEntity_Hatch_Output_ME; public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlockBase<GT_TileEntity_MegaDistillTower> implements ISurvivalConstructable { @@ -377,6 +378,30 @@ public class GT_TileEntity_MegaDistillTower extends GT_TileEntity_MegaMultiBlock } @Override + public boolean canDumpFluidToME() { + + // All fluids can be dumped to ME only if each layer contains a ME Output Hatch. + for (List<GT_MetaTileEntity_Hatch_Output> tLayerOutputHatches : this.mOutputHatchesByLayer) { + + boolean foundMEHatch = false; + + for (IFluidStore tHatch : tLayerOutputHatches) { + if (tHatch instanceof GT_MetaTileEntity_Hatch_Output_ME) { + foundMEHatch = true; + break; + } + } + + // Exit if we didn't find a valid hatch on this layer. + if (!foundMEHatch) { + return false; + } + } + + return true; + } + + @Override protected void addFluidOutputs(FluidStack[] mOutputFluids2) { for (int i = 0; i < mOutputFluids2.length && i < this.mOutputHatchesByLayer.size(); i++) { FluidStack tStack = mOutputFluids2[i].copy(); |
