Fix block-models not being loaded if they are directly in the root models folder

This commit is contained in:
Lukas Rieger (Blue) 2023-02-19 07:03:43 +01:00
parent 75e987f3c8
commit 9917e5dfa5
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
1 changed files with 0 additions and 2 deletions

View File

@ -238,7 +238,6 @@ public class ResourcePack {
.map(path -> path.resolve("models"))
.flatMap(ResourcePack::list)
.filter(path -> !path.getFileName().toString().equals("item"))
.filter(Files::isDirectory)
.flatMap(ResourcePack::walk)
.filter(path -> path.getFileName().toString().endsWith(".json"))
.filter(Files::isRegularFile)
@ -420,7 +419,6 @@ public class ResourcePack {
}
private static Stream<Path> walk(Path root) {
if (!Files.isDirectory(root)) return Stream.empty();
try {
return Files.walk(root);
} catch (IOException ex) {