aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2022-10-31 18:19:59 +0100
committerMartin Robertz <dream-master@gmx.net>2022-10-31 18:19:59 +0100
commit444c1846d07a7eec71879cf039034ef8dccc60d0 (patch)
tree93df21c520b2d5938a10acd538275528c49d3a94 /src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines
parentbd979e43c20322b3d4074ff0d43171b00d00ba88 (diff)
downloadGT5-Unofficial-444c1846d07a7eec71879cf039034ef8dccc60d0.tar.gz
GT5-Unofficial-444c1846d07a7eec71879cf039034ef8dccc60d0.tar.bz2
GT5-Unofficial-444c1846d07a7eec71879cf039034ef8dccc60d0.zip
Revert "add sc steam turbine (#413)"
This reverts commit bd979e43c20322b3d4074ff0d43171b00d00ba88.
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java125
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java10
6 files changed, 7 insertions, 136 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
index 47c7bc9e66..dde4c1127e 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Gas.java
@@ -36,7 +36,7 @@ public class GT_MTE_LargeTurbine_Gas extends GregtechMetaTileEntity_LargerTurbin
}
@Override
- public int getCasingTextureIndex() {
+ public byte getCasingTextureIndex() {
return 58;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
index 7df2649ed0..c41af18a23 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java
@@ -37,7 +37,7 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur
}
@Override
- public int getCasingTextureIndex() {
+ public byte getCasingTextureIndex() {
return 60;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
deleted file mode 100644
index d8a39bd213..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SCSteam.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.render.TextureFactory;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.util.math.MathUtils;
-import java.util.ArrayList;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
-public class GT_MTE_LargeTurbine_SCSteam extends GregtechMetaTileEntity_LargerTurbineBase {
-
- public GT_MTE_LargeTurbine_SCSteam(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MTE_LargeTurbine_SCSteam(String aName) {
- super(aName);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MTE_LargeTurbine_SCSteam(mName);
- }
-
- @Override
- public int getCasingMeta() {
- return 15;
- }
-
- @Override
- public int getCasingTextureIndex() {
- return 1538;
- }
-
- @Override
- protected boolean requiresOutputHatch() {
- return true;
- }
-
- @Override
- public int getPollutionPerSecond(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public int getFuelValue(FluidStack aLiquid) {
- return 0;
- }
-
- @Override
- int fluidIntoPower(ArrayList<FluidStack> aFluids, long aOptFlow, int aBaseEff, float[] flowMultipliers) {
- int tEU = 0;
- int totalFlow = 0; // Byproducts are based on actual flow
- int flow = 0;
- int remainingFlow = MathUtils.safeInt((long) (aOptFlow
- * 1.25f)); // Allowed to use up to 125% of optimal flow. Variable required outside of loop for
- // multi-hatch scenarios.
- this.realOptFlow = (double) aOptFlow * (double) flowMultipliers[0];
-
- storedFluid = 0;
- FluidStack tSCSteam = FluidRegistry.getFluidStack("supercriticalsteam", 1);
- for (int i = 0; i < aFluids.size() && remainingFlow > 0; i++) {
- if (GT_Utility.areFluidsEqual(aFluids.get(i), tSCSteam, true)) {
- flow = Math.min(aFluids.get(i).amount, remainingFlow); // try to use up w/o exceeding remainingFlow
- depleteInput(new FluidStack(aFluids.get(i), flow)); // deplete that amount
- this.storedFluid += aFluids.get(i).amount;
- remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
- totalFlow += flow; // track total input used
- }
- }
- if (totalFlow <= 0) return 0;
- tEU = totalFlow;
- addOutput(GT_ModHandler.getSteam(totalFlow));
- if (totalFlow != aOptFlow) {
- float efficiency = 1.0f - Math.abs((totalFlow - aOptFlow) / (float) aOptFlow);
- // if(totalFlow>aOptFlow){efficiency = 1.0f;}
- tEU *= efficiency;
- tEU = Math.max(1, MathUtils.safeInt((long) tEU * (long) aBaseEff / 10000L));
- } else {
- tEU = MathUtils.safeInt((long) tEU * (long) aBaseEff / 10000L);
- }
-
- return (int) Math.min(tEU * 100L, Integer.MAX_VALUE);
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 6;
- }
-
- @Override
- public String getCustomGUIResourceName() {
- return null;
- }
-
- @Override
- public String getMachineType() {
- return "Large Supercritical Steam Turbine";
- }
-
- @Override
- protected String getTurbineType() {
- return "Supercritical Steam";
- }
-
- @Override
- protected String getCasingName() {
- return "Reinforced SC Turbine Casing";
- }
-
- @Override
- protected ITexture getTextureFrontFace() {
- return TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI5);
- }
-
- @Override
- protected ITexture getTextureFrontFaceActive() {
- return TextureFactory.of(gregtech.api.enums.Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
index 2f808d3db3..0702552aee 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java
@@ -41,7 +41,7 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu
}
@Override
- public int getCasingTextureIndex() {
+ public byte getCasingTextureIndex() {
return 59;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
index 986ba7b51c..6cc3d57eba 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java
@@ -43,7 +43,7 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb
}
@Override
- public int getCasingTextureIndex() {
+ public byte getCasingTextureIndex() {
return 16;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java
index bc1639a052..d44fb475b3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java
@@ -140,7 +140,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
{"ccchccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccccccc", "ccchccc"},
}))
.addElement('c', lazy(t -> ofBlock(t.getCasingBlock(), t.getCasingMeta())))
- .addElement('s', lazy(t -> ofBlock(t.getShaftBlock(), t.getTurbineShaftMeta())))
+ .addElement('s', lazy(t -> ofBlock(t.getCasingBlock(), t.getTurbineShaftMeta())))
.addElement('t', lazy(t -> buildHatchAdder(GregtechMetaTileEntity_LargerTurbineBase.class)
.adder(GregtechMetaTileEntity_LargerTurbineBase::addTurbineHatch)
.hatchClass(GT_MetaTileEntity_Hatch_Turbine.class)
@@ -267,11 +267,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png");
}
- public Block getCasingBlock() {
- return ModBlocks.blockSpecialMultiCasings;
- }
-
- public final Block getShaftBlock() {
+ public final Block getCasingBlock() {
return ModBlocks.blockSpecialMultiCasings;
}
@@ -286,7 +282,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase
return 0;
}
- public abstract int getCasingTextureIndex();
+ public abstract byte getCasingTextureIndex();
public abstract int getFuelValue(FluidStack aLiquid);