mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fix error logging of gas stacks.
This commit is contained in:
1 parent
3d6b202bd5
commit
bd5d064bd0
1 file changed
+8
-3
@@ -3,6 +3,7 @@ package mekanism.common.integration.crafttweaker.util;
|
||||
import com.blamejared.mtlib.helpers.LogHelper;
|
||||
import crafttweaker.api.item.IIngredient;
|
||||
import crafttweaker.api.item.IngredientAny;
|
||||
import mekanism.common.integration.crafttweaker.gas.IGasStack;
|
||||
import mekanism.common.integration.crafttweaker.helpers.IngredientHelper;
|
||||
|
||||
public class IngredientWrapper {
|
||||
@@ -63,13 +64,13 @@ public class IngredientWrapper {
|
||||
public String toString() {
|
||||
String output = "";
|
||||
if (!left.equals(IngredientAny.INSTANCE)) {
|
||||
output += LogHelper.getStackDescription(left);
|
||||
output += getDescriptor(left);
|
||||
}
|
||||
if (!middle.equals(IngredientAny.INSTANCE)) {
|
||||
output += ", " + LogHelper.getStackDescription(middle);
|
||||
output += ", " + getDescriptor(middle);
|
||||
}
|
||||
if (!right.equals(IngredientAny.INSTANCE)) {
|
||||
output += ", " + LogHelper.getStackDescription(right);
|
||||
output += ", " + getDescriptor(right);
|
||||
}
|
||||
if (!infuseType.isEmpty()) {
|
||||
output += ", " + infuseType;
|
||||
@@ -81,4 +82,8 @@ public class IngredientWrapper {
|
||||
return left.equals(IngredientAny.INSTANCE) && middle.equals(IngredientAny.INSTANCE) && right
|
||||
.equals(IngredientAny.INSTANCE) && infuseType.isEmpty();
|
||||
}
|
||||
|
||||
private String getDescriptor(IIngredient ingredient) {
|
||||
return ingredient instanceof IGasStack ? ingredient.toString() : LogHelper.getStackDescription(ingredient);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user