Skip to content

Commit 0bef474

Browse files
committed
Fix Parchment unnamed parameters
Parchment parameters can have a null (or potentially even blank) name for a parameter, while still having a javadoc description. To account for this, use the SRG name if the name is null or blank.
1 parent 90d5a5f commit 0bef474

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/net/minecraftforge/mcmaven/impl/mappings/ParchmentMappings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ private static SideData gather(IMappingFile obf2srg, IMappingFile obf2moj, Parch
281281
}
282282

283283
private static void add(Map<String, Info> map, String orig, String mapped, ParchmentData.Element element) {
284+
mapped = mapped != null && !mapped.isBlank() ? mapped : orig;
284285
var desc = element == null ? null : getJavadocs(element.javadoc);
285286
if (!orig.equals(mapped) || desc != null)
286287
map.put(orig, new Info(mapped, desc));

0 commit comments

Comments
 (0)