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