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:
parent
d539dc12a1
commit
9ee34f57f5
1 changed files with 1 additions and 0 deletions
|
@ -108,6 +108,7 @@ public class ModFileResourcePack extends AbstractResourcePack
|
||||||
.map(path -> root.relativize(path.toAbsolutePath()))
|
.map(path -> root.relativize(path.toAbsolutePath()))
|
||||||
.filter(path -> path.getNameCount() > 0) // skip the root entry
|
.filter(path -> path.getNameCount() > 0) // skip the root entry
|
||||||
.map(p->p.toString().replaceAll("/$","")) // remove the trailing slash, if present
|
.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());
|
.collect(Collectors.toSet());
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
|
|
Loading…
Reference in a new issue