Skip to content

Commit

Permalink
fix reading feather with tiny1 reader instead of tiny2
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS committed Jun 16, 2024
1 parent a1abce6 commit 4c28dc2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import net.fabricmc.mappingio.MappingWriter;
import net.fabricmc.mappingio.adapter.MappingNsCompleter;
import net.fabricmc.mappingio.format.MappingFormat;
import net.fabricmc.mappingio.format.tiny.Tiny1FileReader;
import net.fabricmc.mappingio.format.tiny.Tiny2FileReader;
import net.fabricmc.mappingio.tree.MemoryMappingTree;

import java.io.BufferedReader;
Expand Down Expand Up @@ -92,15 +92,15 @@ public Step.StepResult prepareMappings(OrderedVersion mcVersion) throws IOExcept
visitor = new MappingNsCompleter(visitor, Map.of(MappingsNamespace.CLIENT_OFFICIAL.toString(), MappingsNamespace.INTERMEDIARY.toString(), MappingsNamespace.SERVER_OFFICIAL.toString(), MappingsNamespace.INTERMEDIARY.toString()));
}
try (BufferedReader br = Files.newBufferedReader(mappingsPathInJar, StandardCharsets.UTF_8)) {
Tiny1FileReader.read(br, mappingTree);
Tiny2FileReader.read(br, mappingTree);
}
try (MappingWriter w = MappingWriter.create(mappingsFile, MappingFormat.TINY_2_FILE)) {
mappingTree.accept(w);
}
}
return Step.StepResult.merge(result, Step.StepResult.SUCCESS);
} catch (IOException | RuntimeException e) {
throw new IOException("unable to find Feather gen %d mergedv2 mappings for Minecraft version %s".formatted(GitCraftConfig.ORNITHE_INTERMEDIARY_GEN, mcVersion), e);
throw new IOException("unable to find Feather gen %d mergedv2 mappings for Minecraft version %s".formatted(GitCraftConfig.ORNITHE_INTERMEDIARY_GEN, mcVersion.launcherFriendlyVersionName()), e);
}
}

Expand Down

0 comments on commit 4c28dc2

Please sign in to comment.