mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-11 15:57:42 +00:00
Add meaningful exception text to CustomGradient when resource not found
This commit is contained in:
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()];
|
||||
|
||||
Reference in new issue
Block a user