Potential fix for chisels block-id hack

This commit is contained in:
Blue (Lukas Rieger) 2021-08-10 21:26:49 +02:00
parent d63f340fd9
commit fd109b2407
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800

View File

@ -152,11 +152,12 @@ public void load(File... sources) throws InterruptedException {
String namespace = namespaceRoot.substring("assets/".length());
Logger.global.logInfo("Loading " + namespace + " assets (" + i + "/" + namespaces.size() + ")...");
Collection<String> blockstateFiles = sourcesAccess.listFiles(namespaceRoot + "/blockstates", true);
String blockstatesRootPath = namespaceRoot + "/blockstates";
Collection<String> blockstateFiles = sourcesAccess.listFiles(blockstatesRootPath, true);
for (String blockstateFile : blockstateFiles) {
if (Thread.interrupted()) throw new InterruptedException();
String filename = FileAccess.getFileName(blockstateFile);
String filename = blockstateFile.substring(blockstatesRootPath.length() + 1);
if (!filename.endsWith(".json")) continue;
try {