diff --git a/src/codechicken/lib/colour/CustomGradient.java b/src/codechicken/lib/colour/CustomGradient.java index ba3270f..159bf4b 100644 --- a/src/codechicken/lib/colour/CustomGradient.java +++ b/src/codechicken/lib/colour/CustomGradient.java @@ -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()];