Don't crash on exception during loading of item variants from blockstate jsons.

This commit is contained in:
RainWarrior 2016-01-04 14:08:52 +03:00
parent 856a9c3cdd
commit f562579054
1 changed files with 8 additions and 1 deletions

View File

@ -203,7 +203,14 @@ public class ModelLoader extends ModelBakery
if (model == null || model == getMissingModel())
{
FMLLog.fine("Item json isn't found for '" + memory + "', trying to load the variant from the blockstate json");
registerVariant(getModelBlockDefinition(memory), memory);
try
{
registerVariant(getModelBlockDefinition(memory), memory);
}
catch (Exception exception)
{
FMLLog.getLogger().warn("Unable to load definition " + memory, exception);
}
}
else stateModels.put(memory, model);
}