aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/goodgenerator/blocks/tileEntity
diff options
context:
space:
mode:
authorRealSilverMoon <31100241+RealSilverMoon@users.noreply.github.com>2024-07-15 17:22:09 +0800
committerGitHub <noreply@github.com>2024-07-15 16:22:09 +0700
commitde36e0a3fb2035c862b282440b23f4a6e2b6d392 (patch)
tree9560375c195603205d8544c2d9887e936edf9c05 /src/main/java/goodgenerator/blocks/tileEntity
parente0d55a7759cc5dffc48d4dd424478c41ad1a82a3 (diff)
downloadGT5-Unofficial-de36e0a3fb2035c862b282440b23f4a6e2b6d392.tar.gz
GT5-Unofficial-de36e0a3fb2035c862b282440b23f4a6e2b6d392.tar.bz2
GT5-Unofficial-de36e0a3fb2035c862b282440b23f4a6e2b6d392.zip
Add DroneHatch to fusion reactor (#2670)
* Add DroneHatch to fusion reactor * Reduce input hatch requirement * Change location to avoid conflict
Diffstat (limited to 'src/main/java/goodgenerator/blocks/tileEntity')
-rw-r--r--src/main/java/goodgenerator/blocks/tileEntity/base/LargeFusionComputer.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/base/LargeFusionComputer.java b/src/main/java/goodgenerator/blocks/tileEntity/base/LargeFusionComputer.java
index dbb6beae8b..80533b8a09 100644
--- a/src/main/java/goodgenerator/blocks/tileEntity/base/LargeFusionComputer.java
+++ b/src/main/java/goodgenerator/blocks/tileEntity/base/LargeFusionComputer.java
@@ -2,6 +2,7 @@ package goodgenerator.blocks.tileEntity.base;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.Textures.BlockIcons.*;
+import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;
import static gregtech.api.util.GT_StructureUtility.filterByMTETier;
import static gregtech.api.util.GT_StructureUtility.ofFrame;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
@@ -64,6 +65,7 @@ import gregtech.api.util.GT_ParallelHelper;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.machines.IDualInputHatch;
+import gregtech.common.tileentities.machines.multi.drone.GT_MetaTileEntity_Hatch_DroneDownLink;
public abstract class LargeFusionComputer extends GT_MetaTileEntity_TooltipMultiBlockBase_EM
implements IConstructable, ISurvivalConstructable, IOverclockDescriptionProvider {
@@ -106,6 +108,14 @@ public abstract class LargeFusionComputer extends GT_MetaTileEntity_TooltipMulti
.dot(2)
.buildAndChain(x.getCasingBlock(), x.getCasingMeta())))
.addElement('F', lazy(x -> ofFrame(x.getFrameBox())))
+ .addElement(
+ 'D',
+ lazy(
+ x -> buildHatchAdder(LargeFusionComputer.class).adder(LargeFusionComputer::addDroneHatch)
+ .hatchId(9401)
+ .casingIndex(x.textureIndex())
+ .dot(3)
+ .buildAndChain(x.getCasingBlock(), x.getCasingMeta())))
.build();
}
};
@@ -525,6 +535,15 @@ public abstract class LargeFusionComputer extends GT_MetaTileEntity_TooltipMulti
return false;
}
+ private boolean addDroneHatch(IGregTechTileEntity aBaseMetaTileEntity, int aBaseCasingIndex) {
+ if (aBaseMetaTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aBaseMetaTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (!(aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DroneDownLink tHatch)) return false;
+ tHatch.updateTexture(aBaseCasingIndex);
+ return addToMachineList(aBaseMetaTileEntity, aBaseCasingIndex);
+ }
+
@Override
public IStructureDefinition<LargeFusionComputer> getStructure_EM() {
return STRUCTURE_DEFINITION.get(getClass());
@@ -692,7 +711,7 @@ public abstract class LargeFusionComputer extends GT_MetaTileEntity_TooltipMulti
" CCHCC CCHCC ", " CCHCC CCHCC ",
" CCHCE ECHCC ", " ECHCC CCHCE ",
" CCHCE ECHCC ", " CCHCCC CCCHCC ",
- " CCHCCCC CCCCHCC ", " ECHHCCCCC FCCCCCF CCCCCHHCE ",
+ " CCHCCCC CCCCHCC ", " ECHHCCCCC FCCDCCF CCCCCHHCE ",
" CCCHHCCCCC CCCCCHHCCC ", " CCCCHHHCC CCHHHCCCC ",
" CCCCCHHHHHHHHHCCCCC ", " CCCCC CCCCC ",
" CC CC ", " FCCCCCF ", };