Fixed invalid erroring case during loading Advancements form mods that don't have advancements.

This commit is contained in:
LexManos 2017-07-14 16:10:36 -07:00
parent 6167bbfea9
commit 6d35b1b913
2 changed files with 11 additions and 3 deletions

View file

@ -1305,7 +1305,8 @@ public class ForgeHooks
}
return true;
}
},
true
);
}
}

View file

@ -726,14 +726,21 @@ public class CraftingHelper {
public static boolean findFiles(ModContainer mod, String base, Function<Path, Boolean> preprocessor, BiFunction<Path, Path, Boolean> processor)
{
return findFiles(mod, base, preprocessor, processor, false);
}
public static boolean findFiles(ModContainer mod, String base, Function<Path, Boolean> preprocessor, BiFunction<Path, Path, Boolean> processor, boolean defaultUnfoundRoot)
{
FileSystem fs = null;
try
{
File source = mod.getSource();
if ("minecraft".equals(mod.getModId()) && DEBUG_LOAD_MINECRAFT)
if ("minecraft".equals(mod.getModId()))
{
if (!DEBUG_LOAD_MINECRAFT)
return true;
try
{
URI tmp = CraftingManager.class.getResource("/assets/.mcassetsroot").toURI();
@ -766,7 +773,7 @@ public class CraftingHelper {
}
if (root == null || !Files.exists(root))
return false;
return defaultUnfoundRoot;
if (preprocessor != null)
{