Fix resource pack cache not working as well as it could

This commit is contained in:
embeddedt 2023-05-29 10:15:18 -04:00
parent b8850b2aae
commit 04f34a00fa
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -70,7 +70,7 @@ public abstract class ModFileResourcePackMixin implements ICachingResourcePack {
@Inject(method = "getResources", at = @At("HEAD"), cancellable = true)
private void fastGetResources(PackType type, String resourceNamespace, String pathIn, int maxDepth, Predicate<String> filter, CallbackInfoReturnable<Collection<ResourceLocation>> cir)
{
if(!PackTypeHelper.isVanillaPackType(type) || this.cacheEngine == null)
if(!PackTypeHelper.isVanillaPackType(type))
return;
cir.setReturnValue(this.generateResourceCache().getResources(type, resourceNamespace, pathIn, maxDepth, filter));
}