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);
|
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() {
|
public void resetWorldLoadStateMachine() {
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ public class PackResourcesCacheEngine {
|
||||||
String namespace = pair.getFirst();
|
String namespace = pair.getFirst();
|
||||||
Path root = pair.getSecond();
|
Path root = pair.getSecond();
|
||||||
String[] prefix = new String[] { type.getDirectory(), namespace };
|
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
|
stream
|
||||||
.map(path -> root.relativize(path.toAbsolutePath()))
|
.map(path -> root.relativize(path.toAbsolutePath()))
|
||||||
.filter(PackResourcesCacheEngine::isValidCachedResourcePath)
|
.filter(PackResourcesCacheEngine::isValidCachedResourcePath)
|
||||||
|
|
@ -154,8 +154,10 @@ public class PackResourcesCacheEngine {
|
||||||
if((cachePath.getNameCount() - 2) > maxDepth)
|
if((cachePath.getNameCount() - 2) > maxDepth)
|
||||||
continue;
|
continue;
|
||||||
String fullPath = cachePath.getFullPath(2);
|
String fullPath = cachePath.getFullPath(2);
|
||||||
if(!fullPath.startsWith(testPath))
|
String fullTestPath = fullPath.endsWith("/") ? fullPath : (fullPath + "/");
|
||||||
|
if(!fullTestPath.startsWith(testPath)) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
ResourceLocation foundResource = new ResourceLocation(resourceNamespace, fullPath);
|
ResourceLocation foundResource = new ResourceLocation(resourceNamespace, fullPath);
|
||||||
if(!filter.test(foundResource))
|
if(!filter.test(foundResource))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user