aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/objects/MaterialStack.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/objects/MaterialStack.java')
-rw-r--r--src/main/java/gregtech/api/objects/MaterialStack.java393
1 files changed, 4 insertions, 389 deletions
diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java
index 472298bf77..4392d60a07 100644
--- a/src/main/java/gregtech/api/objects/MaterialStack.java
+++ b/src/main/java/gregtech/api/objects/MaterialStack.java
@@ -1,6 +1,7 @@
package gregtech.api.objects;
import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Utility;
public class MaterialStack implements Cloneable {
public long mAmount;
@@ -31,402 +32,16 @@ public class MaterialStack implements Cloneable {
}
@Override
- //Done sub numbering up to 50. couldn't find a better way to do this
public String toString() {
String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = "";
- if (mAmount == 2) {
- temp4 = "\u2082";
+ if (mAmount > 1) {
+ temp4 = GT_Utility.toSubscript(mAmount);
if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
temp1 = "(";
temp3 = ")";
}
}
- if (mAmount == 3) {
- temp4 = "\u2083";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 4) {
- temp4 = "\u2084";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 5) {
- temp4 = "\u2085";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 6) {
- temp4 = "\u2086";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 7) {
- temp4 = "\u2087";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 8) {
- temp4 = "\u2088";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 9) {
- temp4 = "\u2089";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 10) {
- temp4 = "\u2081"+"\u2080";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 11) {
- temp4 = "\u2081"+"\u2081";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 12) {
- temp4 = "\u2081"+"\u2082";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 13) {
- temp4 = "\u2081"+"\u2083";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 14) {
- temp4 = "\u2081"+"\u2084";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 15) {
- temp4 = "\u2081"+"\u2085";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 16) {
- temp4 = "\u2081"+"\u2086";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 17) {
- temp4 = "\u2081"+"\u2087";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 18) {
- temp4 = "\u2081"+"\u2088";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 19) {
- temp4 = "\u2081"+"\u2089";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 20) {
- temp4 = "\u2082"+"\u2080";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 21) {
- temp4 = "\u2082"+"\u2081";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 22) {
- temp4 = "\u2082"+"\u2082";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 23) {
- temp4 = "\u2082"+"\u2083";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 24) {
- temp4 = "\u2082"+"\u2084";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 25) {
- temp4 = "\u2082"+"\u2085";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 26) {
- temp4 = "\u2082"+"\u2086";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 27) {
- temp4 = "\u2082"+"\u2087";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 28) {
- temp4 = "\u2082"+"\u2088";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 29) {
- temp4 = "\u2082"+"\u2089";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 30) {
- temp4 = "\u2083"+"\u2080";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 31) {
- temp4 = "\u2083"+"\u2081";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 32) {
- temp4 = "\u2083"+"\u2082";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 33) {
- temp4 = "\u2083"+"\u2083";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 34) {
- temp4 = "\u2083"+"\u2084";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 35) {
- temp4 = "\u2083"+"\u2085";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 36) {
- temp4 = "\u2083"+"\u2086";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 37) {
- temp4 = "\u2083"+"\u2087";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 38) {
- temp4 = "\u2083"+"\u2088";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 39) {
- temp4 = "\u2083"+"\u2089";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 40) {
- temp4 = "\u2084"+"\u2080";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 41) {
- temp4 = "\u2084"+"\u2081";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 42) {
- temp4 = "\u2084"+"\u2082";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 43) {
- temp4 = "\u2084"+"\u2083";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 44) {
- temp4 = "\u2084"+"\u2084";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 45) {
- temp4 = "\u2084"+"\u2085";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 46) {
- temp4 = "\u2084"+"\u2086";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 47) {
- temp4 = "\u2084"+"\u2087";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 48) {
- temp4 = "\u2084"+"\u2088";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 49) {
- temp4 = "\u2084"+"\u2089";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
- if (mAmount == 50) {
- temp4 = "\u2085"+"\u2080";
-
- if (mMaterial.mMaterialList.size() > 1 || isMaterialListComplex(this)) {
- temp1 = "(";
- temp3 = ")";
- }
- }
-
return String.valueOf(new StringBuilder().append(temp1).append(temp2).append(temp3).append(temp4));
}
@@ -444,4 +59,4 @@ public class MaterialStack implements Cloneable {
public int hashCode() {
return mMaterial.hashCode();
}
-}
+} \ No newline at end of file