Package dev.architectury.loom.mappings
Class ForgeMappingsMerger
java.lang.Object
dev.architectury.loom.mappings.ForgeMappingsMerger
Merges a Tiny file with a new namespace.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionnet.fabricmc.mappingio.tree.MemoryMappingTreemerge()static net.fabricmc.mappingio.tree.MemoryMappingTreemergeMojang(MappingContext context, Path tiny, @Nullable ForgeMappingsMerger.ExtraMappings extraMappings, boolean lenient) static net.fabricmc.mappingio.tree.MemoryMappingTreemergeSrg(Path srg, Path tiny, @Nullable ForgeMappingsMerger.ExtraMappings extraMappings, boolean lenient) Merges SRG mappings with a tiny mappings tree through the obf names.
-
Method Details
-
merge
- Throws:
IOException
-
mergeSrg
public static net.fabricmc.mappingio.tree.MemoryMappingTree mergeSrg(Path srg, Path tiny, @Nullable ForgeMappingsMerger.ExtraMappings extraMappings, boolean lenient) throws IOException, MappingException Merges SRG mappings with a tiny mappings tree through the obf names. This overload returns aMemoryMappingTreeof the merged mappings.The namespaces in the tiny file should be
official, intermediary, named. The SRG names will add a new namespace calledsrgso that the final namespaces areofficial, srg, intermediary, named.This method does not include local variables in the output. It can, however, be used for remapping the game jar since it has all classes, methods, fields, parameters and javadoc comments.
If
lenientis true, the merger will not error when encountering names not present in the tiny mappings. Instead, the names will be filled from theofficialnamespace.- Parameters:
srg- the SRG file in .tsrg formattiny- the tiny fileextraMappings- an extra mappings file that will be used to determine whether an unobfuscated name is needed in the result filelenient- whether lenient mode is enabled- Returns:
- the merged mapping tree
- Throws:
IOException- if an IO error occurs while reading the mappingsMappingException- if the input tiny mappings' namespaces are incorrect or if an element mentioned in the SRG file does not have tiny mappings in non-lenient mode
-
mergeMojang
public static net.fabricmc.mappingio.tree.MemoryMappingTree mergeMojang(MappingContext context, Path tiny, @Nullable ForgeMappingsMerger.ExtraMappings extraMappings, boolean lenient) throws IOException, MappingException - Throws:
IOExceptionMappingException
-