9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-22 08:29:35 +00:00

Improve debugger

This commit is contained in:
XiaoMoMi
2024-09-15 22:51:25 +08:00
parent 0bf974bd98
commit c65ef9f18f
2 changed files with 3 additions and 8 deletions

View File

@@ -135,10 +135,7 @@ public class SynchronizedCompoundMap {
Tag<?> tag = entry.getValue();
String tagValue;
switch (tag.getType()) {
case TAG_STRING -> {
tagValue = "\"" + tag.getValue().toString() + "\"";
}
case TAG_BYTE, TAG_DOUBLE, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY,
case TAG_STRING, TAG_BYTE, TAG_DOUBLE, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY,
TAG_LONG, TAG_SHORT, TAG_SHORT_ARRAY, TAG_LONG_ARRAY, TAG_BYTE_ARRAY ->
tagValue = tag.getValue().toString();
case TAG_LIST -> {
@@ -161,7 +158,7 @@ public class SynchronizedCompoundMap {
joiner.add(entry.getKey() + "=" + tagValue);
}
if (key.isEmpty()) {
return joiner.toString();
return "[" + joiner + "]";
} else {
return key + "=[" + joiner + "]";
}

View File

@@ -48,9 +48,7 @@ public class CustomCropsBlockStateImpl implements CustomCropsBlockState {
@Override
public String asString() {
return owner.type().asString() +
"[" + compoundMap.asString() +
']';
return owner.type().asString() + compoundMap.asString();
}
@Override