Fix some of minecraft's resources loading twice, as minecraft is on the list of namespaces as minecraft and as an empty string

This commit is contained in:
ichttt 2019-01-26 23:23:05 +01:00
parent d539dc12a1
commit 9ee34f57f5
1 changed files with 1 additions and 0 deletions

View File

@ -108,6 +108,7 @@ public class ModFileResourcePack extends AbstractResourcePack
.map(path -> root.relativize(path.toAbsolutePath()))
.filter(path -> path.getNameCount() > 0) // skip the root entry
.map(p->p.toString().replaceAll("/$","")) // remove the trailing slash, if present
.filter(s -> !s.isEmpty()) //filter empty strings, otherwise empty strings default to minecraft in ResourceLocations
.collect(Collectors.toSet());
}
catch (IOException e)