mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
Use IProperty#getName when generating blockstate jsons (#6582)
Close #6520
This commit is contained in:
1 parent
c23ea1e733
commit
7fa42ca064
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -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());
|
||||
}
|
||||
|
||||
+1
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user