Use IProperty#getName when generating blockstate jsons (#6582)

Close #6520
This commit is contained in:
Edwin Mindcraft authored and GitHub committed 2020-05-15 13:28:10 -04:00
1 parent c23ea1e733
commit 7fa42ca064
2 files changed
+3 -3

No files matched your search

@@ -119,10 +119,10 @@ public final class MultiPartBlockStateBuilder implements IGeneratedBlockstate {
JsonObject when = new JsonObject();
for (Entry<IProperty<?>, Collection<Comparable<?>>> e : conditions.asMap().entrySet()) {
StringBuilder activeString = new StringBuilder();
for (Object val : e.getValue()) {
for (Comparable<?> val : e.getValue()) {
if (activeString.length() > 0)
activeString.append("|");
activeString.append(val.toString());
activeString.append(((IProperty) e.getKey()).getName(val));
}
when.addProperty(e.getKey().getName(), activeString.toString());
}
@@ -307,7 +307,7 @@ public class VariantBlockStateBuilder implements IGeneratedBlockstate {
}
ret.append(entry.getKey().getName())
.append('=')
.append(entry.getValue());
.append(((IProperty) entry.getKey()).getName(entry.getValue()));
}
return ret.toString();
}