Merge 1.20 into 1.20.4
This commit is contained in:
commit
2699fe448e
|
|
@ -56,6 +56,12 @@ public class ModernFixClient {
|
|||
ModernFix.LOGGER.error("Could not instantiate integration {}", className, e);
|
||||
}
|
||||
}
|
||||
|
||||
if(ModernFixMixinPlugin.instance.isOptionEnabled("perf.dynamic_resources.FireIntegrationHook")) {
|
||||
for(ModernFixClientIntegration integration : ModernFixClient.CLIENT_INTEGRATIONS) {
|
||||
integration.onDynamicResourcesStatusChange(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void resetWorldLoadStateMachine() {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class PackResourcesCacheEngine {
|
|||
String namespace = pair.getFirst();
|
||||
Path root = pair.getSecond();
|
||||
String[] prefix = new String[] { type.getDirectory(), namespace };
|
||||
try (Stream<Path> stream = Files.walk(root)) {
|
||||
try (Stream<Path> stream = Files.find(root, Integer.MAX_VALUE, (p, a) -> a.isRegularFile())) {
|
||||
stream
|
||||
.map(path -> root.relativize(path.toAbsolutePath()))
|
||||
.filter(PackResourcesCacheEngine::isValidCachedResourcePath)
|
||||
|
|
@ -154,8 +154,10 @@ public class PackResourcesCacheEngine {
|
|||
if((cachePath.getNameCount() - 2) > maxDepth)
|
||||
continue;
|
||||
String fullPath = cachePath.getFullPath(2);
|
||||
if(!fullPath.startsWith(testPath))
|
||||
String fullTestPath = fullPath.endsWith("/") ? fullPath : (fullPath + "/");
|
||||
if(!fullTestPath.startsWith(testPath)) {
|
||||
continue;
|
||||
}
|
||||
ResourceLocation foundResource = new ResourceLocation(resourceNamespace, fullPath);
|
||||
if(!filter.test(foundResource))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user