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
1 changed files with 9 additions and 2 deletions

View File

@ -256,8 +256,15 @@ public class ModelLoader extends ModelBakery
if(!stateModels.containsKey(ModelDynBucket.LOCATION))
{
// load forges blockstate json for it
ModelResourceLocation memory = getInventoryVariant("forge:dynbucket");
registerVariant(getModelBlockDefinition(memory), memory);
try
{
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