Merge 1.18 into 1.19.2
This commit is contained in:
commit
27d831ef6a
|
|
@ -67,7 +67,7 @@ public abstract class ModNioResourcePackMixin implements ICachingResourcePack {
|
|||
|
||||
@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, locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private void useCacheForExistence(PackType type, ResourceLocation id, CallbackInfoReturnable<Boolean> cir, String filename) {
|
||||
if(cacheEngine != null)
|
||||
if(cacheEngine != null && (filename.startsWith("assets/") || filename.startsWith("data/")))
|
||||
cir.setReturnValue(this.cacheEngine.hasResource(filename));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public abstract class ModFileResourcePackMixin implements ICachingResourcePack {
|
|||
@Inject(method = "hasResource(Ljava/lang/String;)Z", at = @At(value = "HEAD"), cancellable = true)
|
||||
private void useCacheForExistence(String path, CallbackInfoReturnable<Boolean> cir) {
|
||||
PackResourcesCacheEngine engine = this.generateResourceCache();
|
||||
if(engine != null)
|
||||
if(engine != null && (path.startsWith("assets/") || path.startsWith("data/")))
|
||||
cir.setReturnValue(engine.hasResource(path));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user