Show meaningful error if ModelLoaderRegistry is used before the missing model is initialized.

This commit is contained in:
RainWarrior committed 2016-03-23 08:20:06 +03:00
1 parent 9edd056f55
commit 884cc690ea
1 file changed
+4
@@ -192,6 +192,10 @@ public class ModelLoaderRegistry
public static IModel getMissingModel()
{
if(ModelLoader.VanillaLoader.INSTANCE.getLoader() == null)
{
throw new IllegalStateException("Using ModelLoaderRegistry too early.");
}
return ModelLoader.VanillaLoader.INSTANCE.getLoader().getMissingModel();
}