mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-30 13:05:27 -05:00
Fix MappingsProviderImpl.areMappingsMergedV2
This commit is contained in:
@@ -349,7 +349,10 @@ public class MappingsProviderImpl implements MappingsProvider, SharedService {
|
||||
|
||||
private static boolean areMappingsMergedV2(Path path) throws IOException {
|
||||
try (BufferedReader reader = Files.newBufferedReader(path)) {
|
||||
return MappingReader.detectFormat(reader) == MappingFormat.TINY_2 && MappingReader.getNamespaces(reader).containsAll(Arrays.asList("named", "intermediary", "official"));
|
||||
reader.mark(4096); // == DETECT_HEADER_LEN
|
||||
boolean isTinyV2 = MappingReader.detectFormat(reader) == MappingFormat.TINY_2;
|
||||
reader.reset();
|
||||
return isTinyV2 && MappingReader.getNamespaces(reader, MappingFormat.TINY_2).containsAll(Arrays.asList("named", "intermediary", "official"));
|
||||
} catch (NoSuchFileException e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user