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

Close #6520
This commit is contained in:
Edwin Mindcraft 2020-05-15 19:28:10 +02:00 committed by GitHub
parent c23ea1e733
commit 7fa42ca064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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());
}

View File

@ -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();
}