diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-07 13:34:21 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-05-07 13:34:21 +0100 |
| commit | c5e04f2c8e0c5393d9a5ef63a87ae4f0094af301 (patch) | |
| tree | 170a49181f336842c82cf6e12f63f7e4b8e2cad1 /src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java | |
| parent | 208b1f1e0d5faf601b53818b04f6699b2e6cb6bc (diff) | |
- Added EE3 EMC values, thank you to MineMarteen for providing the ThirdPartyManager code :)
- Working on making it possible to translate every part of the mod
- Created an interface modders can use to make an item wearable in the jewelry inventory and have special effects
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java b/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java index 6d20408..182644b 100644 --- a/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java +++ b/src/main/java/darkknight/jewelrycraft/item/ItemGoldObj.java @@ -14,6 +14,7 @@ import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import darkknight.jewelrycraft.util.JewelryNBT; @@ -57,13 +58,13 @@ public class ItemGoldObj extends Item public String getItemStackDisplayName(ItemStack stack) { - if (stack != null && stack.hasTagCompound() && stack.getTagCompound().hasKey("target") && Item.getItemById(Integer.valueOf(stack.getTagCompound().getTag("target").toString().split(",")[0].substring(4).replace("s", ""))) != null && JewelryNBT.item(stack) != null) return "Golden " + JewelryNBT.item(stack).getDisplayName(); - return "Golden Object"; + if (stack != null && stack.hasTagCompound() && stack.getTagCompound().hasKey("target") && Item.getItemById(Integer.valueOf(stack.getTagCompound().getTag("target").toString().split(",")[0].substring(4).replace("s", ""))) != null && JewelryNBT.item(stack) != null) return StatCollector.translateToLocal("info." + Variables.MODID + ".golden") + " " + JewelryNBT.item(stack).getDisplayName(); + return StatCollector.translateToLocal("item." + Variables.MODID + ".goldObject.name"); } public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean displayInfo) { - if (displayInfo) if (stack != null && JewelryNBT.item(stack) != null && JewelryNBT.item(stack).getItem() instanceof ItemFood) list.add(EnumChatFormatting.DARK_PURPLE + "It's made of solid gold! How are you suppose to eat this?"); - else list.add(EnumChatFormatting.DARK_PURPLE + "Shiny, but useless :("); + if (displayInfo) if (stack != null && JewelryNBT.item(stack) != null && JewelryNBT.item(stack).getItem() instanceof ItemFood) list.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("item." + Variables.MODID + ".goldObject.info.food")); + else list.add(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("item." + Variables.MODID + ".goldObject.info.standard")); } } |
