This commit is contained in:
embeddedt 2023-05-02 14:57:35 -04:00
parent f274dc1f5f
commit fb2929215f
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -48,7 +48,7 @@ public abstract class ModNioResourcePackMixin {
}
}
@Inject(method = "hasResource", at = @At(value = "HEAD"), cancellable = true)
@Inject(method = "hasResource", at = @At(value = "INVOKE", target = "Lnet/fabricmc/fabric/impl/resource/loader/ModNioResourcePack;getPath(Ljava/lang/String;)Ljava/nio/file/Path;"), cancellable = true)
private void useCacheForExistence(String path, CallbackInfoReturnable<Boolean> cir) {
if(cacheEngine != null)
cir.setReturnValue(this.cacheEngine.hasResource(path));