9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-22 16:39:36 +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(); Tag<?> tag = entry.getValue();
String tagValue; String tagValue;
switch (tag.getType()) { switch (tag.getType()) {
case TAG_STRING -> { case TAG_STRING, TAG_BYTE, TAG_DOUBLE, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY,
tagValue = "\"" + tag.getValue().toString() + "\"";
}
case TAG_BYTE, TAG_DOUBLE, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY,
TAG_LONG, TAG_SHORT, TAG_SHORT_ARRAY, TAG_LONG_ARRAY, TAG_BYTE_ARRAY -> TAG_LONG, TAG_SHORT, TAG_SHORT_ARRAY, TAG_LONG_ARRAY, TAG_BYTE_ARRAY ->
tagValue = tag.getValue().toString(); tagValue = tag.getValue().toString();
case TAG_LIST -> { case TAG_LIST -> {
@@ -161,7 +158,7 @@ public class SynchronizedCompoundMap {
joiner.add(entry.getKey() + "=" + tagValue); joiner.add(entry.getKey() + "=" + tagValue);
} }
if (key.isEmpty()) { if (key.isEmpty()) {
return joiner.toString(); return "[" + joiner + "]";
} else { } else {
return key + "=[" + joiner + "]"; return key + "=[" + joiner + "]";
} }

View File

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