From 31e4330b69c8d08099af177af18c8955e029aeae Mon Sep 17 00:00:00 2001 From: Muramasa Date: Sun, 17 Apr 2016 01:41:06 +0100 Subject: Large Diesel Generator Added large diesel generator to the game. It replicates the Large Plasma Generator but it's nominal output is 1/8 that plasmas is. Plasma Nominal: Optimal Steam Flow * 40 Diesel Nominal: Optimal Steam Flow * 5 --- .../GT_MetaTileEntity_LargeTurbine_Diesel.java | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java new file mode 100644 index 0000000000..ddd11bb338 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java @@ -0,0 +1,128 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +import java.util.ArrayList; +import java.util.Collection; + +public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_LargeTurbine { + + public GT_MetaTileEntity_LargeTurbine_Diesel(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public GT_MetaTileEntity_LargeTurbine_Diesel(String aName) { + super(aName); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + } + + + public String[] getDescription() { + return new String[]{ + "Controller Block for the Large Diesel Generator", + "Size: 3x4x3 (Hollow)", "Controller (front centered)", + "1x Input Hatch (side centered)", + "1x Dynamo Hatch (back centered)", + "1x Maintenance Hatch (side centered)", + "Turbine Casings for the rest (24 at least!)", + "Needs a Turbine Item (inside controller GUI)"}; + } + + public int getFuelValue(FluidStack aLiquid) { + if (aLiquid == null || GT_Recipe_Map.sTurbineFuels == null) return 0; + FluidStack tLiquid; + Collection tRecipeList = GT_Recipe_Map.sDieselFuels.mRecipeList; + if (tRecipeList != null) for (GT_Recipe tFuel : tRecipeList) + if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null) + if (aLiquid.isFluidEqual(tLiquid)) return tFuel.mSpecialValue; + return 0; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_LargeTurbine_Plasma(mName); + } + + @Override + public Block getCasingBlock() { + return GregTech_API.sBlockCasings4; + } + + @Override + public byte getCasingMeta() { + return 9; + } + + @Override + public byte getCasingTextureIndex() { + return 46; + } + + @Override + public int getPollutionPerTick(ItemStack aStack) { + return 0; + } + + @Override + int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { + + aOptFlow *= 5; + int tEU = 0; + + int actualOptimalFlow = 0; + + if (aFluids.size() >= 1) { + FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! + int fuelValue = getFuelValue(firstFuelType); + actualOptimalFlow = (int) ((aOptFlow + fuelValue - 1) / fuelValue); + + int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. + int flow = 0; + int totalFlow = 0; + + for (int i = 0; i < aFluids.size(); i++) { + if (aFluids.get(i).isFluidEqual(firstFuelType)) { + flow = aFluids.get(i).amount; // Get all (steam) in hatch + flow = Math.min(flow, Math.min(remainingFlow, (int) (actualOptimalFlow * 1.25f))); // try to use up to 125% of optimal flow w/o exceeding remainingFlow + depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount + remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches + totalFlow += flow; // track total input used + } + } + + tEU = (int) (Math.min((float) actualOptimalFlow, totalFlow) * fuelValue); + + if (totalFlow != actualOptimalFlow) { + float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); + if(totalFlow>aOptFlow){efficiency = 1.0f;} + if (efficiency < 0) + efficiency = 0; // Can happen with really ludicrously poor inefficiency. + tEU *= efficiency; + tEU = Math.max(1, tEU * aBaseEff / 10000); + } else { + tEU = tEU * aBaseEff / 10000; + } + + return tEU; + + } + return 0; + } + + +} -- cgit From 063b62b4ca34c4f90696216317de21b975aa2d41 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Sun, 17 Apr 2016 03:05:58 +0100 Subject: Fixed newMetaEntity using Plasma Generator --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java index ddd11bb338..6a5a9e0473 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java @@ -55,7 +55,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_LargeTurbine_Plasma(mName); + return new GT_MetaTileEntity_LargeTurbine_Diesel(mName); } @Override @@ -89,6 +89,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar if (aFluids.size() >= 1) { FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); + System.out.println(fuelValue); actualOptimalFlow = (int) ((aOptFlow + fuelValue - 1) / fuelValue); int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. -- cgit From ddc0c4299e8d3c703b6b93f876ce38f961d08236 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Sun, 17 Apr 2016 07:40:10 +0100 Subject: Turbine Rebalance Added 3 new turbine casings to rebalance the turbines. Also changed turbine controller recipes to fit the rebalance. Large Steam: Steel Turbine Casing Large HP Steam Turbine: Stainless Steel Turbine Casing Large Gas Turbine: Steel Turbine Casing Large Diesel Turbine: Titanium Turbine Casing Large Plasma Turbine: Tungstensteel Turbine Casing --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java index 6a5a9e0473..7866d96435 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI5) : Textures.BlockIcons.CASING_BLOCKS[59]}; } @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar "1x Input Hatch (side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Titanium Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -65,7 +65,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar @Override public byte getCasingMeta() { - return 9; + return 11; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 419b885d47..a371ce9646 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.CASING_BLOCKS[58]}; } @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", "1x Muffler Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Stainless Steel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -66,7 +66,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public byte getCasingMeta() { - return 9; + return 10; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index b9b4b7b2b4..e1a33330d5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.CASING_BLOCKS[58]}; } public String[] getDescription() { @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La "1x Input Hatch (side centered)", "1x Output Hatch(side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Stainless Steel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -54,7 +54,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public byte getCasingMeta() { - return 9; + return 10; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 7cb84129c4..ab986bf717 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU5) : Textures.BlockIcons.CASING_BLOCKS[60]}; } @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar "1x Input Hatch (side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Tungstensteel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -65,7 +65,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public byte getCasingMeta() { - return 9; + return 12; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 34e23196a7..534f53c36b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -30,7 +30,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } public String[] getDescription() { -- cgit From 79444adc76688a463ddedfdb4088fb6aa8fe6747 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Sun, 17 Apr 2016 07:41:35 +0100 Subject: Revert "Turbine Rebalance" This reverts commit ddc0c4299e8d3c703b6b93f876ce38f961d08236. --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 6 +++--- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java index 7866d96435..6a5a9e0473 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI5) : Textures.BlockIcons.CASING_BLOCKS[59]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar "1x Input Hatch (side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Titanium Turbine Casings for the rest (24 at least!)", + "Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -65,7 +65,7 @@ public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_Lar @Override public byte getCasingMeta() { - return 11; + return 9; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index a371ce9646..419b885d47 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.CASING_BLOCKS[58]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", "1x Muffler Hatch (side centered)", - "Stainless Steel Turbine Casings for the rest (24 at least!)", + "Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -66,7 +66,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public byte getCasingMeta() { - return 10; + return 9; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index e1a33330d5..b9b4b7b2b4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.CASING_BLOCKS[58]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } public String[] getDescription() { @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La "1x Input Hatch (side centered)", "1x Output Hatch(side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Stainless Steel Turbine Casings for the rest (24 at least!)", + "Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -54,7 +54,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public byte getCasingMeta() { - return 10; + return 9; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index ab986bf717..7cb84129c4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU5) : Textures.BlockIcons.CASING_BLOCKS[60]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar "1x Input Hatch (side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Tungstensteel Turbine Casings for the rest (24 at least!)", + "Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -65,7 +65,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public byte getCasingMeta() { - return 12; + return 9; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 534f53c36b..34e23196a7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -30,7 +30,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } public String[] getDescription() { -- cgit From 12a1d1c46ee02ba437a275cb9c9554db3f38fa8e Mon Sep 17 00:00:00 2001 From: Muramasa Date: Tue, 19 Apr 2016 23:17:31 +0100 Subject: Main Commit --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 8 ++++---- .../machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java | 8 ++++---- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java | 8 ++++---- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 419b885d47..a914ab3a12 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.CASING_BLOCKS[59]}; } @@ -40,7 +40,7 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", "1x Muffler Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Stainless Steel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -66,12 +66,12 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT @Override public byte getCasingMeta() { - return 9; + return 11; } @Override public byte getCasingTextureIndex() { - return 46; + return 59; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java index b9b4b7b2b4..7befab0088 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_SS5) : Textures.BlockIcons.CASING_BLOCKS[58]}; } public String[] getDescription() { @@ -38,7 +38,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La "1x Input Hatch (side centered)", "1x Output Hatch(side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Stainless Steel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -54,12 +54,12 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La @Override public byte getCasingMeta() { - return 9; + return 10; } @Override public byte getCasingTextureIndex() { - return 46; + return 58; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 7cb84129c4..c72e880783 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -28,7 +28,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TU5) : Textures.BlockIcons.CASING_BLOCKS[60]}; } @@ -39,7 +39,7 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar "1x Input Hatch (side centered)", "1x Dynamo Hatch (back centered)", "1x Maintenance Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", + "Tungstensteel Turbine Casings for the rest (24 at least!)", "Needs a Turbine Item (inside controller GUI)"}; } @@ -65,12 +65,12 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar @Override public byte getCasingMeta() { - return 9; + return 12; } @Override public byte getCasingTextureIndex() { - return 46; + return 60; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 34e23196a7..534f53c36b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -30,7 +30,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg @Override public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST5) : Textures.BlockIcons.CASING_BLOCKS[57]}; } public String[] getDescription() { -- cgit From d713c5ddec9e944c636795d2cfcc6fa296ce7bf0 Mon Sep 17 00:00:00 2001 From: Muramasa Date: Tue, 19 Apr 2016 23:19:59 +0100 Subject: Remove Diesel Turbine --- .../GT_MetaTileEntity_LargeTurbine_Diesel.java | 129 --------------------- 1 file changed, 129 deletions(-) delete mode 100644 src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java (limited to 'src/main/java/gregtech/common/tileentities') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java deleted file mode 100644 index 6a5a9e0473..0000000000 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Diesel.java +++ /dev/null @@ -1,129 +0,0 @@ -package gregtech.common.tileentities.machines.multi; - -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.metatileentity.IMetaTileEntity; -import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; -import gregtech.api.util.GT_Recipe; -import gregtech.api.util.GT_Recipe.GT_Recipe_Map; -import gregtech.api.util.GT_Utility; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidStack; - -import java.util.ArrayList; -import java.util.Collection; - -public class GT_MetaTileEntity_LargeTurbine_Diesel extends GT_MetaTileEntity_LargeTurbine { - - public GT_MetaTileEntity_LargeTurbine_Diesel(int aID, String aName, String aNameRegional) { - super(aID, aName, aNameRegional); - } - - public GT_MetaTileEntity_LargeTurbine_Diesel(String aName) { - super(aName); - } - - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE5) : Textures.BlockIcons.CASING_BLOCKS[57]}; - } - - - public String[] getDescription() { - return new String[]{ - "Controller Block for the Large Diesel Generator", - "Size: 3x4x3 (Hollow)", "Controller (front centered)", - "1x Input Hatch (side centered)", - "1x Dynamo Hatch (back centered)", - "1x Maintenance Hatch (side centered)", - "Turbine Casings for the rest (24 at least!)", - "Needs a Turbine Item (inside controller GUI)"}; - } - - public int getFuelValue(FluidStack aLiquid) { - if (aLiquid == null || GT_Recipe_Map.sTurbineFuels == null) return 0; - FluidStack tLiquid; - Collection tRecipeList = GT_Recipe_Map.sDieselFuels.mRecipeList; - if (tRecipeList != null) for (GT_Recipe tFuel : tRecipeList) - if ((tLiquid = GT_Utility.getFluidForFilledItem(tFuel.getRepresentativeInput(0), true)) != null) - if (aLiquid.isFluidEqual(tLiquid)) return tFuel.mSpecialValue; - return 0; - } - - @Override - public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { - return new GT_MetaTileEntity_LargeTurbine_Diesel(mName); - } - - @Override - public Block getCasingBlock() { - return GregTech_API.sBlockCasings4; - } - - @Override - public byte getCasingMeta() { - return 9; - } - - @Override - public byte getCasingTextureIndex() { - return 46; - } - - @Override - public int getPollutionPerTick(ItemStack aStack) { - return 0; - } - - @Override - int fluidIntoPower(ArrayList aFluids, int aOptFlow, int aBaseEff) { - - aOptFlow *= 5; - int tEU = 0; - - int actualOptimalFlow = 0; - - if (aFluids.size() >= 1) { - FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! - int fuelValue = getFuelValue(firstFuelType); - System.out.println(fuelValue); - actualOptimalFlow = (int) ((aOptFlow + fuelValue - 1) / fuelValue); - - int remainingFlow = (int) (actualOptimalFlow * 1.25f); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for multi-hatch scenarios. - int flow = 0; - int totalFlow = 0; - - for (int i = 0; i < aFluids.size(); i++) { - if (aFluids.get(i).isFluidEqual(firstFuelType)) { - flow = aFluids.get(i).amount; // Get all (steam) in hatch - flow = Math.min(flow, Math.min(remainingFlow, (int) (actualOptimalFlow * 1.25f))); // try to use up to 125% of optimal flow w/o exceeding remainingFlow - depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount - remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches - totalFlow += flow; // track total input used - } - } - - tEU = (int) (Math.min((float) actualOptimalFlow, totalFlow) * fuelValue); - - if (totalFlow != actualOptimalFlow) { - float efficiency = 1.0f - Math.abs(((totalFlow - (float) actualOptimalFlow) / actualOptimalFlow)); - if(totalFlow>aOptFlow){efficiency = 1.0f;} - if (efficiency < 0) - efficiency = 0; // Can happen with really ludicrously poor inefficiency. - tEU *= efficiency; - tEU = Math.max(1, tEU * aBaseEff / 10000); - } else { - tEU = tEU * aBaseEff / 10000; - } - - return tEU; - - } - return 0; - } - - -} -- cgit