Skip to content

Commit

Permalink
Add higher tiered fluid regulators (GTNewHorizons#3061)
Browse files Browse the repository at this point in the history
Co-authored-by: kstvr32 <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
  • Loading branch information
3 people authored Sep 10, 2024
1 parent 900f72d commit 07a668f
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 10 deletions.
6 changes: 6 additions & 0 deletions src/main/java/gregtech/api/enums/ItemList.java
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ public enum ItemList implements IItemContainer {
FluidRegulator_LuV,
FluidRegulator_ZPM,
FluidRegulator_UV,
FluidRegulator_UHV,
FluidRegulator_UEV,
FluidRegulator_UIV,
FluidRegulator_UMV,
FluidRegulator_UXV,
FluidRegulator_MAX,

Conveyor_Module_LV,
Conveyor_Module_MV,
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/gregtech/common/covers/CoverFluidRegulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public class CoverFluidRegulator extends CoverBehaviorBase<CoverFluidRegulator.F

public CoverFluidRegulator(int aTransferRate, ITexture coverTexture) {
super(FluidRegulatorData.class, coverTexture);
if (aTransferRate > (-1 >>> (Integer.SIZE - SPEED_LENGTH)))
throw new IllegalArgumentException("aTransferRate too big: " + aTransferRate);
this.mTransferRate = aTransferRate;
}

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/gregtech/common/items/IDMetaItem01.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ public enum IDMetaItem01 {
Field_Generator_UMV(46),
Field_Generator_UXV(47),
Field_Generator_MAX(48),
FluidRegulator_UHV(49),
FluidRegulator_UEV(50),
FluidRegulator_UIV(51),
FluidRegulator_UMV(52),
FluidRegulator_UXV(53),
FluidRegulator_MAX(54),
Component_Minecraft_Wheels_Iron(100),
Component_Minecraft_Wheels_Steel(101),
Compressed_Fireclay(110),
Expand Down
59 changes: 51 additions & 8 deletions src/main/java/gregtech/common/items/MetaGeneratedItem01.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,14 @@
import static gregtech.common.items.IDMetaItem01.FluidRegulator_IV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_LV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_LuV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_MAX;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_MV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_UEV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_UHV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_UIV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_UMV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_UV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_UXV;
import static gregtech.common.items.IDMetaItem01.FluidRegulator_ZPM;
import static gregtech.common.items.IDMetaItem01.Fuel_Can_Plastic_Empty;
import static gregtech.common.items.IDMetaItem01.Fuel_Can_Plastic_Filled;
Expand Down Expand Up @@ -2052,30 +2058,59 @@ public MetaGeneratedItem01() {
new TCAspects.TC_AspectStack(TCAspects.AQUA, 16L)));

ItemList.FluidRegulator_LV.set(
addItem(FluidRegulator_LV.ID, "Fluid Regulator (LV)", FRText1 + GTUtility.formatNumbers(640) + FRText2));
addItem(
FluidRegulator_LV.ID,
"Fluid Regulator (LV)",
FRText1 + GTUtility.formatNumbers(32 * 20) + FRText2));
ItemList.FluidRegulator_MV.set(
addItem(FluidRegulator_MV.ID, "Fluid Regulator (MV)", FRText1 + GTUtility.formatNumbers(2560) + FRText2));
addItem(
FluidRegulator_MV.ID,
"Fluid Regulator (MV)",
FRText1 + GTUtility.formatNumbers(128 * 20) + FRText2));
ItemList.FluidRegulator_HV.set(
addItem(FluidRegulator_HV.ID, "Fluid Regulator (HV)", FRText1 + GTUtility.formatNumbers(10240) + FRText2));
addItem(
FluidRegulator_HV.ID,
"Fluid Regulator (HV)",
FRText1 + GTUtility.formatNumbers(512 * 20) + FRText2));
ItemList.FluidRegulator_EV.set(
addItem(FluidRegulator_EV.ID, "Fluid Regulator (EV)", FRText1 + GTUtility.formatNumbers(40960) + FRText2));
addItem(
FluidRegulator_EV.ID,
"Fluid Regulator (EV)",
FRText1 + GTUtility.formatNumbers(2048 * 20) + FRText2));
ItemList.FluidRegulator_IV.set(
addItem(FluidRegulator_IV.ID, "Fluid Regulator (IV)", FRText1 + GTUtility.formatNumbers(163840) + FRText2));
addItem(
FluidRegulator_IV.ID,
"Fluid Regulator (IV)",
FRText1 + GTUtility.formatNumbers(8192 * 20) + FRText2));
ItemList.FluidRegulator_LuV.set(
addItem(
FluidRegulator_LuV.ID,
"Fluid Regulator (LuV)",
FRText1 + GTUtility.formatNumbers(655360) + FRText2));
FRText1 + GTUtility.formatNumbers(32768 * 20) + FRText2));
ItemList.FluidRegulator_ZPM.set(
addItem(
FluidRegulator_ZPM.ID,
"Fluid Regulator (ZPM)",
FRText1 + GTUtility.formatNumbers(2621440) + FRText2));
FRText1 + GTUtility.formatNumbers(131072 * 20) + FRText2));
ItemList.FluidRegulator_UV.set(
addItem(
FluidRegulator_UV.ID,
"Fluid Regulator (UV)",
FRText1 + GTUtility.formatNumbers(10485760) + FRText2));
FRText1 + GTUtility.formatNumbers(524288 * 20) + FRText2));
ItemList.FluidRegulator_UHV.set(
addItem(
FluidRegulator_UHV.ID,
"Fluid Regulator (UHV)",
FRText1 + GTUtility.formatNumbers(1048576 * 20) + FRText2));
ItemList.FluidRegulator_UEV.set(
addItem(
FluidRegulator_UEV.ID,
"Fluid Regulator (UEV)",
FRText1 + GTUtility.formatNumbers(2097152 * 20) + FRText2));
ItemList.FluidRegulator_UIV.set(addItem(FluidRegulator_UIV.ID, "Fluid Regulator (UIV)", PartNotCoverText));
ItemList.FluidRegulator_UMV.set(addItem(FluidRegulator_UMV.ID, "Fluid Regulator (UMV)", PartNotCoverText));
ItemList.FluidRegulator_UXV.set(addItem(FluidRegulator_UXV.ID, "Fluid Regulator (UXV)", PartNotCoverText));
ItemList.Electric_Pump_MAX.set(addItem(FluidRegulator_MAX.ID, "Fluid Regulator (MAX)", PartNotCoverText));

ItemList.FluidFilter.set(
addItem(FluidFilter.ID, "Fluid Filter Cover", "Set with Fluid Container to only accept one Fluid Type"));
Expand Down Expand Up @@ -3696,6 +3731,14 @@ private void registerCovers() {
ItemList.FluidRegulator_UV.get(1L),
TextureFactory.of(MACHINE_CASINGS[8][0], TextureFactory.of(OVERLAY_PUMP)),
new CoverFluidRegulator(524288, TextureFactory.of(OVERLAY_PUMP)));
GregTechAPI.registerCover(
ItemList.FluidRegulator_UHV.get(1L),
TextureFactory.of(MACHINE_CASINGS[9][0], TextureFactory.of(OVERLAY_PUMP)),
new CoverFluidRegulator(1048576, TextureFactory.of(OVERLAY_PUMP)));
GregTechAPI.registerCover(
ItemList.FluidRegulator_UEV.get(1L),
TextureFactory.of(MACHINE_CASINGS[10][0], TextureFactory.of(OVERLAY_PUMP)),
new CoverFluidRegulator(2097152, TextureFactory.of(OVERLAY_PUMP)));

GregTechAPI.registerCover(
ItemList.FluidFilter.get(1L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,56 @@ public void run() {
.eut(TierEU.RECIPE_UV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Electric_Pump_UHV.get(1),
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.UHV), 2),
GTUtility.getIntegratedCircuit(3))
.itemOutputs(ItemList.FluidRegulator_UHV.get(1))
.duration(1 * SECONDS)
.eut(TierEU.RECIPE_UHV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Electric_Pump_UEV.get(1),
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.UEV), 2),
GTUtility.getIntegratedCircuit(3))
.itemOutputs(ItemList.FluidRegulator_UEV.get(1))
.duration(1 * SECONDS)
.eut(TierEU.RECIPE_UEV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Electric_Pump_UIV.get(1),
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.UIV), 2),
GTUtility.getIntegratedCircuit(3))
.itemOutputs(ItemList.FluidRegulator_UIV.get(1))
.duration(1 * SECONDS)
.eut(TierEU.RECIPE_UIV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Electric_Pump_UMV.get(1),
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.UMV), 2),
GTUtility.getIntegratedCircuit(3))
.itemOutputs(ItemList.FluidRegulator_UMV.get(1))
.duration(1 * SECONDS)
.eut(TierEU.RECIPE_UMV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Electric_Pump_UXV.get(1),
GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.UXV), 2),
GTUtility.getIntegratedCircuit(3))
.itemOutputs(ItemList.FluidRegulator_UXV.get(1))
.duration(1 * SECONDS)
.eut(TierEU.RECIPE_UXV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Steam_Valve_LV.get(1),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"animation": {"frametime": 3}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"animation": {"frametime": 1}}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"animation": {"frametime": 3}}

0 comments on commit 07a668f

Please sign in to comment.