mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-11 15:57:32 +00:00
Catch and log exceptions during model baking (#4609)
This commit is contained in:
1 parent
196e03c921
commit
533b03300a
1 file changed
+11
-2
@@ -180,14 +180,23 @@ public final class ModelLoader extends ModelBakery
|
||||
|
||||
for(IModel model : models.keySet())
|
||||
{
|
||||
bakeBar.step("[" + Joiner.on(", ").join(models.get(model)) + "]");
|
||||
String modelLocations = "[" + Joiner.on(", ").join(models.get(model)) + "]";
|
||||
bakeBar.step(modelLocations);
|
||||
if(model == getMissingModel())
|
||||
{
|
||||
bakedModels.put(model, missingBaked);
|
||||
}
|
||||
else
|
||||
{
|
||||
bakedModels.put(model, model.bake(model.getDefaultState(), DefaultVertexFormats.ITEM, DefaultTextureGetter.INSTANCE));
|
||||
try
|
||||
{
|
||||
bakedModels.put(model, model.bake(model.getDefaultState(), DefaultVertexFormats.ITEM, DefaultTextureGetter.INSTANCE));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.log.error("Exception baking model for location(s) {}:", modelLocations, e);
|
||||
bakedModels.put(model, missingBaked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user