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

This commit is contained in:
RainWarrior committed 2016-01-18 21:35:23 +03:00
1 parent 812e69cee3
commit 968b7cae40
1 file changed
+9 -2
@@ -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