From 3c852a0143cbfa864da59bdd0b2edab1fa4bf146 Mon Sep 17 00:00:00 2001 From: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Date: Sun, 18 Dec 2022 17:38:54 +0000 Subject: Turbine efficiency helper (#1562) * Add value to automatically determine highest possible turbine efficiency. * spotlessApply (#1563) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/main/java/gregtech/api/util/GT_Utility.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main/java/gregtech/api/util') diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index da98e97f8e..e24c893063 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -4331,4 +4331,15 @@ public class GT_Utility { @Nullable protected abstract NBTTagCompound nbt(); } + + public static int getPlasmaFuelValueInEUPerLiterFromMaterial(Materials material) { + return getPlasmaFuelValueInEUPerLiterFromFluid(material.getPlasma(1)); + } + + public static int getPlasmaFuelValueInEUPerLiterFromFluid(FluidStack aLiquid) { + if (aLiquid == null) return 0; + GT_Recipe tFuel = GT_Recipe.GT_Recipe_Map.sPlasmaFuels.findFuel(aLiquid); + if (tFuel != null) return tFuel.mSpecialValue; + return 0; + } } -- cgit