aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java3
-rw-r--r--src/main/java/com/github/technus/tectech/util/TT_Utility.java15
2 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
index 37592a3d9f..3df0c495d3 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_EyeOfHarmony.java
@@ -5,6 +5,7 @@ import static com.github.technus.tectech.thing.CustomItemList.astralArrayFabrica
import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.eyeOfHarmonyRenderBlock;
import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0;
+import static com.github.technus.tectech.util.TT_Utility.toStandardForm;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlocksTiered;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
@@ -1502,7 +1503,7 @@ public class GT_MetaTileEntity_EM_EyeOfHarmony extends GT_MetaTileEntity_Multibl
} else {
str.add(
"Estimated EU/t: " + RED
- + ReadableNumberConverter.INSTANCE.toWideReadableForm(euPerTick.longValue())
+ + toStandardForm(euPerTick)
+ RESET
+ " EU/t");
}
diff --git a/src/main/java/com/github/technus/tectech/util/TT_Utility.java b/src/main/java/com/github/technus/tectech/util/TT_Utility.java
index ba87811364..1ffe19ef0b 100644
--- a/src/main/java/com/github/technus/tectech/util/TT_Utility.java
+++ b/src/main/java/com/github/technus/tectech/util/TT_Utility.java
@@ -32,6 +32,21 @@ public final class TT_Utility {
return getFormatter().format("%+.5E", value).toString();
}
+ // Formats to standard form.
+ public static String toStandardForm(long number) {
+ if (number == 0) {
+ return "0";
+ }
+
+ int exponent = (int) Math.floor(Math.log10(Math.abs(number)));
+ double mantissa = number / Math.pow(10, exponent);
+
+ // Round the mantissa to two decimal places
+ mantissa = Math.round(mantissa * 100.0) / 100.0;
+
+ return mantissa + "*10^" + exponent;
+ }
+
public static int bitStringToInt(String bits) {
if (bits == null) {
return 0;