Use IProperty#getName when generating blockstate jsons (#6582)
Close #6520
This commit is contained in:
parent
c23ea1e733
commit
7fa42ca064
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue