Add meaningful exception text to CustomGradient when resource not found

This commit is contained in:
Chicken-Bomes committed 2014-06-15 00:23:00 +10:00
1 parent 66015a13c5
commit 307ca81694
1 file changed
+3
@@ -13,6 +13,9 @@ public class CustomGradient
public CustomGradient(ResourceLocation textureFile)
{
BufferedImage img = TextureUtils.loadBufferedImage(textureFile);
if(img == null)
throw new RuntimeException("File not found: "+textureFile.toString());
int[] data = new int[img.getWidth()];
img.getRGB(0, 0, img.getWidth(), 1, data, 0, img.getWidth());
gradient = new int[img.getWidth()];