diff options
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java index 29e678f..09054db 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java @@ -22,7 +22,6 @@ import darkknight.jewelrycraft.util.Variables; public class ItemMoltenMetal extends Item { - /** * */ @@ -68,9 +67,15 @@ public class ItemMoltenMetal extends Item public static int color(ItemStack stack, int pass) throws IOException { IResourceManager rm = Minecraft.getMinecraft().getResourceManager(); + ResourceLocation ingot; BufferedImage icon; if (stack != null && JewelryNBT.ingot(stack) != null && Item.getIdFromItem(JewelryNBT.ingot(stack).getItem()) > 0 && JewelryNBT.ingot(stack).getIconIndex() != null && JewelryNBT.ingotColor(stack) == 16777215){ - ResourceLocation ingot = ItemBaseJewelry.getLocation(JewelryNBT.ingot(stack), stack, false); + try{ + ingot = ItemBaseJewelry.getLocation(JewelryNBT.ingot(stack), stack, false); + } + catch(Exception e){ + ingot = new ResourceLocation("textures/items/apple.png"); + } icon = ImageIO.read(rm.getResource(ingot).getInputStream()); int height = icon.getHeight(); int width = icon.getWidth(); |
