Skip to content

Commit

Permalink
fix mapping reader in apply nests step
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceWalkerRS committed Jun 16, 2024
1 parent 211f275 commit 8a33384
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,16 @@ private Path prepareNests(OrnitheNestsVersionMeta nestsMeta, OrderedVersion mcVe
}
Path mappingsPath = mappings.get();
try {
mappingsPath = mappingsPath.resolve(".tmp");

MemoryMappingTree mappingTree = new MemoryMappingTree();
MappingVisitor visitor = new MappingDstNsReorder(mappingTree, mappingFlavour.getMappingImpl().getDestinationNS());
if (side != Side.MERGED) {
visitor = new MappingSourceNsSwitch(visitor, "official");
visitor = new MappingNsRenamer(visitor, Map.of(side == Side.CLIENT ? "clientOfficial" : "serverOfficial", "official"));
}
MappingReader.read(mappingsPath, visitor);

mappingsPath = mappingsPath.resolve(".tmp");

try (MappingWriter writer = MappingWriter.create(mappingsPath, MappingFormat.TINY_2_FILE)) {
mappingTree.accept(writer);
}
Expand Down

0 comments on commit 8a33384

Please sign in to comment.