From 93c88cfd4d08b1230c303cafd7e3ff947d5f09ab Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Thu, 2 Nov 2023 18:17:11 +0200 Subject: [PATCH] Fix MojangMappingsMerger having incomplete names --- .../dev/architectury/loom/neoforge/MojangMappingsMerger.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/dev/architectury/loom/neoforge/MojangMappingsMerger.java b/src/main/java/dev/architectury/loom/neoforge/MojangMappingsMerger.java index f6822531e..ca0b8f71d 100644 --- a/src/main/java/dev/architectury/loom/neoforge/MojangMappingsMerger.java +++ b/src/main/java/dev/architectury/loom/neoforge/MojangMappingsMerger.java @@ -44,7 +44,9 @@ public static MemoryMappingTree mergeMojangMappings(MappingContext context, Path MemoryMappingTree incomplete = processor.getMappings(List.of(inputLayer, renamedMojangLayer)); MemoryMappingTree result = new MemoryMappingTree(); MappingVisitor visitor = new MappingSourceNsSwitch(result, MappingsNamespace.OFFICIAL.toString()); - Map toComplete = Map.of(MappingsNamespace.INTERMEDIARY.toString(), MappingsNamespace.OFFICIAL.toString()); + // Run via intermediary first to drop any missing names. + visitor = new MappingSourceNsSwitch(visitor, MappingsNamespace.INTERMEDIARY.toString(), true); + Map toComplete = Map.of(MappingsNamespace.MOJANG.toString(), MappingsNamespace.OFFICIAL.toString()); visitor = new MappingNsCompleter(visitor, toComplete); incomplete.accept(visitor); return result;