Skip to content

Instantly share code, notes, and snippets.

@ethernet8023
Created August 27, 2013 19:34
Show Gist options
  • Select an option

  • Save ethernet8023/6357989 to your computer and use it in GitHub Desktop.

Select an option

Save ethernet8023/6357989 to your computer and use it in GitHub Desktop.
derp
protected void drawItemStackTooltip(ItemStack par1ItemStack, int par2, int par3)
{
List list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
for (int k = 0; k < list.size(); ++k)
{
if (k == 0)
{
list.set(k, "\u00a7" + Integer.toHexString(par1ItemStack.getRarity().rarityColor) + (String)list.get(k));
}
else
{
list.set(k, EnumChatFormatting.GRAY + (String)list.get(k));
}
}
FontRenderer font = par1ItemStack.getItem().getFontRenderer(par1ItemStack);
drawHoveringText(list, par2, par3, (font == null ? fontRenderer : font));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment