use of net.minecraft.server.packs.PackResources in project MinecraftForge by MinecraftForge.
the class DelegatingResourcePack method buildNamespaceMap.
private Map<String, List<PackResources>> buildNamespaceMap(PackType type, List<PackResources> packList) {
Map<String, List<PackResources>> map = new HashMap<>();
for (PackResources pack : packList) {
for (String namespace : pack.getNamespaces(type)) {
map.computeIfAbsent(namespace, k -> new ArrayList<>()).add(pack);
}
}
map.replaceAll((k, list) -> ImmutableList.copyOf(list));
return ImmutableMap.copyOf(map);
}
Aggregations