File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/xyz/jpenilla/reflectionremapper Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1717 */
1818package xyz .jpenilla .reflectionremapper ;
1919
20+ import java .io .BufferedInputStream ;
2021import java .io .IOException ;
2122import java .io .InputStream ;
2223import java .io .InputStreamReader ;
@@ -218,10 +219,13 @@ static ReflectionRemapper forPaperReobfMappings(final InputStream mappings) {
218219 return noop ();
219220 }
220221
221- if (firstLine (mappings ).contains (MappingNamespace .MOJANG_PLUS_YARN )) {
222- return forMappings (mappings , MappingNamespace .MOJANG_PLUS_YARN , MappingNamespace .SPIGOT );
222+ final InputStream bufferedMappings = mappings instanceof BufferedInputStream
223+ ? mappings
224+ : new BufferedInputStream (mappings );
225+ if (firstLine (bufferedMappings ).contains (MappingNamespace .MOJANG_PLUS_YARN )) {
226+ return forMappings (bufferedMappings , MappingNamespace .MOJANG_PLUS_YARN , MappingNamespace .SPIGOT );
223227 }
224- return forMappings (mappings , MappingNamespace .MOJANG , MappingNamespace .SPIGOT );
228+ return forMappings (bufferedMappings , MappingNamespace .MOJANG , MappingNamespace .SPIGOT );
225229 }
226230
227231 /**
You can’t perform that action at this time.
0 commit comments