Fix block-models not being loaded if they are directly in the root models folder
This commit is contained in:
parent
75e987f3c8
commit
9917e5dfa5
|
@ -238,7 +238,6 @@ public class ResourcePack {
|
||||||
.map(path -> path.resolve("models"))
|
.map(path -> path.resolve("models"))
|
||||||
.flatMap(ResourcePack::list)
|
.flatMap(ResourcePack::list)
|
||||||
.filter(path -> !path.getFileName().toString().equals("item"))
|
.filter(path -> !path.getFileName().toString().equals("item"))
|
||||||
.filter(Files::isDirectory)
|
|
||||||
.flatMap(ResourcePack::walk)
|
.flatMap(ResourcePack::walk)
|
||||||
.filter(path -> path.getFileName().toString().endsWith(".json"))
|
.filter(path -> path.getFileName().toString().endsWith(".json"))
|
||||||
.filter(Files::isRegularFile)
|
.filter(Files::isRegularFile)
|
||||||
|
@ -420,7 +419,6 @@ public class ResourcePack {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Stream<Path> walk(Path root) {
|
private static Stream<Path> walk(Path root) {
|
||||||
if (!Files.isDirectory(root)) return Stream.empty();
|
|
||||||
try {
|
try {
|
||||||
return Files.walk(root);
|
return Files.walk(root);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
|
|
Loading…
Reference in New Issue