Skip to content

Commit

Permalink
Merge pull request #342 from MCTian-mi/hatches
Browse files Browse the repository at this point in the history
Add lv-hv multiple fluid hatches
  • Loading branch information
bruberu authored Nov 30, 2024
2 parents 32491a5 + 06388c8 commit a19575b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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")));
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
18 changes: 18 additions & 0 deletions src/main/resources/assets/susy/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a19575b

Please sign in to comment.