Merge 1.18 into 1.19.2
This commit is contained in:
commit
d97b18e633
|
|
@ -57,6 +57,13 @@ public class CachedResourcePath {
|
|||
pathComponents = components;
|
||||
}
|
||||
|
||||
/**
|
||||
* DOES NOT INTERN!
|
||||
*/
|
||||
public CachedResourcePath(String[] pathComponents) {
|
||||
this.pathComponents = pathComponents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Arrays.hashCode(pathComponents);
|
||||
|
|
|
|||
|
|
@ -133,6 +133,11 @@ public class PackResourcesCacheEngine {
|
|||
return this.containedPaths.contains(new CachedResourcePath(path));
|
||||
}
|
||||
|
||||
public boolean hasResource(String[] paths) {
|
||||
awaitLoad();
|
||||
return this.containedPaths.contains(new CachedResourcePath(paths));
|
||||
}
|
||||
|
||||
public Collection<ResourceLocation> getResources(PackType type, String resourceNamespace, String pathIn, int maxDepth, Predicate<ResourceLocation> filter) {
|
||||
if(!PackTypeHelper.isVanillaPackType(type))
|
||||
throw new IllegalArgumentException("Only vanilla PackTypes are supported");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user