From 06388c86c6f4c0b2a422babffc5dee1c1c5f1298 Mon Sep 17 00:00:00 2001 From: MCTian-mi <35869948+MCTian-mi@users.noreply.github.com> Date: Sun, 1 Dec 2024 01:38:10 +0800 Subject: [PATCH] add lv-hv fluid hatches --- .../SuSyMetaTileEntities.java | 26 ++++++++++++++++--- .../resources/assets/susy/lang/en_us.lang | 18 +++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java b/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java index ef1153c75..ec1c87209 100644 --- a/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java +++ b/src/main/java/supersymmetry/common/metatileentities/SuSyMetaTileEntities.java @@ -13,6 +13,7 @@ import gregtech.common.blocks.BlockTurbineCasing; import gregtech.common.blocks.MetaBlocks; import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityEnergyHatch; +import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityMultiFluidHatch; import gregtech.common.metatileentities.storage.MetaTileEntityDrum; import net.minecraft.util.ResourceLocation; import org.jetbrains.annotations.NotNull; @@ -41,6 +42,7 @@ import java.util.function.Function; +import static gregtech.api.util.GTUtility.gregtechId; import static gregtech.common.metatileentities.MetaTileEntities.registerMetaTileEntity; public class SuSyMetaTileEntities { @@ -157,6 +159,11 @@ public class SuSyMetaTileEntities { public static MetaTileEntitySieveDistillationTower SIEVE_DISTILLATION_TOWER; + public static final MetaTileEntityMultiFluidHatch[] SUSY_QUADRUPLE_IMPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV + public static final MetaTileEntityMultiFluidHatch[] SUSY_NONUPLE_IMPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV + public static final MetaTileEntityMultiFluidHatch[] SUSY_QUADRUPLE_EXPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV + public static final MetaTileEntityMultiFluidHatch[] SUSY_NONUPLE_EXPORT_HATCH = new MetaTileEntityMultiFluidHatch[3]; // LV-HV + public static void init() { MAGNETIC_REFRIGERATOR = registerMetaTileEntity(14500, new MetaTileEntityMagneticRefrigerator(susyId("magnetic_refrigerator"))); COAGULATION_TANK = registerMetaTileEntity(14501, new MetaTileEntityCoagulationTank(susyId("coagulation_tank"))); @@ -219,9 +226,9 @@ public static void init() { registerSimpleMTE(CVD, 12, 14653, "cvd", SuSyRecipeMaps.CVD_RECIPES, SusyTextures.CVD_OVERLAY, true, GTUtility.defaultTankSizeFunction); registerSimpleMTE(ION_IMPLANTER, 12, 14666, "ion_implanter", SuSyRecipeMaps.ION_IMPLANTATION_RECIPES, SusyTextures.ION_IMPLANTER_OVERLAY, true, GTUtility.defaultTankSizeFunction); - int i = 14500; - while (GregTechAPI.MTE_REGISTRY.getObjectById(i) != null) i++; - SusyLog.logger.debug("The next available ID is: " + i); + int id = 14500; + while (GregTechAPI.MTE_REGISTRY.getObjectById(id) != null) id++; + SusyLog.logger.debug("The next available ID is: " + id); //thermodynamic stuff registerSimpleMTE(FLUID_COMPRESSOR, 12, 15000, "fluid_compressor", SuSyRecipeMaps.FLUID_COMPRESSOR_RECIPES, SusyTextures.FLUID_COMPRESSOR_OVERLAY, true, GTUtility.defaultTankSizeFunction); @@ -285,6 +292,19 @@ public static void init() { LARGE_FLUID_PUMP = registerMetaTileEntity(17021, new MetaTileEntityLargeFluidPump(susyId("large_fluid_pump"))); + for (int i = GTValues.LV; i <= GTValues.HV; i++) { // Quadruple/Nonuple hatches: 17022-17033 + int index = i - GTValues.LV; + String tierName = GTValues.VN[i].toLowerCase(); + SUSY_QUADRUPLE_IMPORT_HATCH[index] = registerMetaTileEntity(17022 + index, + new MetaTileEntityMultiFluidHatch(gregtechId("fluid_hatch.import_4x." + tierName), i, 4, false)); + SUSY_NONUPLE_IMPORT_HATCH[index] = registerMetaTileEntity(17025 + index, + new MetaTileEntityMultiFluidHatch(gregtechId("fluid_hatch.import_9x." + tierName), i, 9, false)); + SUSY_QUADRUPLE_EXPORT_HATCH[index] = registerMetaTileEntity(17028 + index, + new MetaTileEntityMultiFluidHatch(gregtechId("fluid_hatch.export_4x." + tierName), i, 4, true)); + SUSY_NONUPLE_EXPORT_HATCH[index] = registerMetaTileEntity(17031 + index, + new MetaTileEntityMultiFluidHatch(gregtechId("fluid_hatch.export_9x." + tierName), i, 9, true)); + } + registerSimpleMTE(ELECTROSTATIC_SEPARATOR, 12, 17035, "electrostatic_separator", SuSyRecipeMaps.ELECTROSTATIC_SEPARATOR, SusyTextures.ELECTROSTATIC_SEPARATOR_OVERLAY, true, GTUtility.defaultTankSizeFunction); registerSimpleMTE(POLISHING_MACHINE, 12, 17048, "polishing_machine", SuSyRecipeMaps.POLISHING_MACHINE, SusyTextures.POLISHING_MACHINE_OVERLAY, true, GTUtility.defaultTankSizeFunction); registerSimpleMTE(TEXTILE_SPINNER, 12, 17061, "textile_spinner", SuSyRecipeMaps.SPINNING_RECIPES, SusyTextures.TEXTILE_SPINNER_OVERLAY, true); diff --git a/src/main/resources/assets/susy/lang/en_us.lang b/src/main/resources/assets/susy/lang/en_us.lang index 89854d2ab..5d058e688 100644 --- a/src/main/resources/assets/susy/lang/en_us.lang +++ b/src/main/resources/assets/susy/lang/en_us.lang @@ -730,6 +730,24 @@ gregtech.machine.energy_hatch.output_4a.hv.name=HV 4A Dynamo Hatch gregtech.machine.energy_hatch.output_16a.hv.name=HV 16A Dynamo Hatch gregtech.machine.energy_hatch.output_16a.ev.name=EV 16A Dynamo Hatch +# Quadruple & Nonuple Fluid Hatches + +gregtech.machine.fluid_hatch.import_4x.lv.name=LV Quadruple Input Hatch +gregtech.machine.fluid_hatch.import_4x.mv.name=MV Quadruple Input Hatch +gregtech.machine.fluid_hatch.import_4x.hv.name=HV Quadruple Input Hatch + +gregtech.machine.fluid_hatch.import_9x.lv.name=LV Nonuple Input Hatch +gregtech.machine.fluid_hatch.import_9x.mv.name=MV Nonuple Input Hatch +gregtech.machine.fluid_hatch.import_9x.hv.name=HV Nonuple Input Hatch + +gregtech.machine.fluid_hatch.export_4x.lv.name=LV Quadruple Output Hatch +gregtech.machine.fluid_hatch.export_4x.mv.name=LV Quadruple Output Hatch +gregtech.machine.fluid_hatch.export_4x.hv.name=LV Quadruple Output Hatch + +gregtech.machine.fluid_hatch.export_9x.lv.name=LV Nonuple Output Hatch +gregtech.machine.fluid_hatch.export_9x.mv.name=MV Nonuple Output Hatch +gregtech.machine.fluid_hatch.export_9x.hv.name=HV Nonuple Output Hatch + # Other multiblock parts gregtech.machine.dumping_hatch=Dumping Hatch