Fixed MaterialStack String representations sometimes missing brackets

This commit is contained in:
Johannes Gäßler 2017-05-18 19:22:06 +02:00
parent e7d8d5ecbe
commit d805ce4613

View file

@ -1,6 +1,7 @@
package gregtech.api.objects;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_Log;
public class MaterialStack implements Cloneable {
public long mAmount;
@ -33,9 +34,10 @@ public class MaterialStack implements Cloneable {
@Override
public String toString() {
String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = "";
System.out.println("EPIK "+mMaterial.mDefaultLocalName+" "+mMaterial.mElement);
if (mAmount > 1) {
temp4 = String.valueOf(mAmount);
if (mMaterial.mMaterialList.size() > 1) {
if (mMaterial.mMaterialList.size() > 1 || (mMaterial.mMaterialList.size() == 1 && mMaterial.mElement == null)) {
temp1 = "(";
temp3 = ")";
}