aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-12 17:37:26 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2021-12-12 17:37:26 +0000
commit15a114d5fd7b18a14ac8561aaf46db903022763a (patch)
tree0325d1f7070753ac8c8e574078a1e4ae1a01158e /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
parent21b8db8c06eae0da0698a317d6ec1d634e3881c5 (diff)
downloadGT5-Unofficial-15a114d5fd7b18a14ac8561aaf46db903022763a.tar.gz
GT5-Unofficial-15a114d5fd7b18a14ac8561aaf46db903022763a.tar.bz2
GT5-Unofficial-15a114d5fd7b18a14ac8561aaf46db903022763a.zip
Fixed GregtechMeta_MultiBlockBase not handling hatches correctly.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
index 058f6c03e9..81f8ba9edb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
@@ -62,7 +62,6 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
}))
.addElement('b', ofChain(
ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 1),
- ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addOutputToMachineList, getCasingIndex(), 1),
ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addInputToMachineList, getCasingIndex(), 1),
ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 1),
onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4))
@@ -264,14 +263,18 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
}
protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output))
+ if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) {
+ Logger.INFO("Bad Output Hatch");
return false;
+ }
while (mOutputHatchesByLayer.size() < mHeight) {
mOutputHatchesByLayer.add(new ArrayList<>());
}
GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
tHatch.updateTexture(aBaseCasingIndex);
- return mOutputHatchesByLayer.get(mHeight - 1).add(tHatch);
+ boolean addedHatch = mOutputHatchesByLayer.get(mHeight - 1).add(tHatch);
+ Logger.INFO("Added Hatch: "+addedHatch);
+ return addedHatch;
}
@Override
@@ -295,6 +298,7 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
// check base
if (!checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0)) {
+ Logger.INFO("Bad Base. Height: "+mHeight);
return false;
}
@@ -302,6 +306,7 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
while (mHeight < 8 && checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0) && !mTopLayerFound) {
if (mOutputHatchesByLayer.get(mHeight - 1).isEmpty()) {
// layer without output hatch
+ Logger.INFO("Height: "+mHeight + " - Missing output on "+(mHeight - 1));
return false;
}
// not top
@@ -313,7 +318,7 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
Logger.INFO("Casings: "+mCasing);
Logger.INFO("Required: "+(7 * mHeight - 5));
Logger.INFO("Found Top: "+mTopLayerFound);
- return mCasing >= 7 * mHeight - 5 && mTopLayerFound && mMaintenanceHatches.size() == 1;
+ return mCasing >= 45 && mTopLayerFound && mMaintenanceHatches.size() == 1;
}
@Override
@@ -370,6 +375,11 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB
}
@Override
+ public boolean requiresVanillaGtGUI() {
+ return true;
+ }
+
+ @Override
public String getMachineType() {
return "Gas Sparger";
}