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/ItemBaseJewelry.java | 1 + src/main/java/darkknight/jewelrycraft/item/ItemMoltenMetal.java | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/item') diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java index 0d97e22..f5c7848 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemBaseJewelry.java @@ -17,6 +17,7 @@ import net.minecraft.client.resources.IResourceManager; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; 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