Skip to content

Commit 3388647

Browse files
committed
Fixed concise export including things that actually have mappings already
1 parent 5514d71 commit 3388647

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/main/java/eu/ha3/presencefootsteps/world/StateLookup.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,19 @@ public void writeToReport(boolean full, JsonObjectWriter writer, Map<String, Blo
7777
groups.put(group.getStepSound().id().toString() + "@" + substrate, group);
7878
}
7979

80-
if (full || !contains(state)) {
80+
boolean excludeFromExport = false;
81+
if (!full) {
82+
for (String substrate : substrates.keySet()) {
83+
if (!Substrates.WET.equals(substrate)) {
84+
excludeFromExport |= substrates.get(substrate).contains(state);
85+
if (excludeFromExport) {
86+
break;
87+
}
88+
}
89+
}
90+
}
91+
92+
if (!excludeFromExport) {
8193
writer.object(Registries.BLOCK.getId(block).toString(), () -> {
8294
writer.field("class", getClassData(state));
8395
writer.field("tags", getTagData(state));

0 commit comments

Comments
 (0)