From c19aeae6ae51ca9019f8051f83ab7eb52f4a1608 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Thu, 30 Apr 2015 01:25:36 +0100 Subject: - Hand Pedestals no longer close the palm when you put something in - Fixed the ritual crashing - Fixed the Liquids Tab from crashing --- src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java') 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(); -- cgit v1.2.3