Correctly handle error caused by missing/malformed bucket model definition file.

This commit is contained in:
RainWarrior 2016-01-18 21:35:23 +03:00
parent 812e69cee3
commit 968b7cae40

View file

@ -256,8 +256,15 @@ public class ModelLoader extends ModelBakery
if(!stateModels.containsKey(ModelDynBucket.LOCATION)) if(!stateModels.containsKey(ModelDynBucket.LOCATION))
{ {
// load forges blockstate json for it // load forges blockstate json for it
ModelResourceLocation memory = getInventoryVariant("forge:dynbucket"); try
registerVariant(getModelBlockDefinition(memory), memory); {
registerVariant(getModelBlockDefinition(ModelDynBucket.LOCATION), ModelDynBucket.LOCATION);
}
catch (Exception exception)
{
FMLLog.getLogger().error("Could not load the forge bucket model from the blockstate", exception);
return;
}
} }
// empty bucket // empty bucket