--- 66 line
/** Remaining ticks the item highlight should be visible */
protected int remainingHighlightTicks;
/** The ItemStack that is currently being highlighted */
protected ItemStack highlightingItemStack;
--- 252 line
if (this.remainingHighlightTicks > 0 && this.highlightingItemStack != null)
{
s2 = this.highlightingItemStack.getDisplayName();
k1 = (k - fontrenderer.getStringWidth(s2)) / 2;
l1 = l - 59;
if (!this.mc.playerController.shouldDrawHUD())
{
l1 += 14;
}
i2 = (int)((float)this.remainingHighlightTicks * 256.0F / 10.0F);
if (i2 > 255)
{
i2 = 255;
}
if (i2 > 0)
{
GL11.glPushMatrix();
GL11.glEnable(GL11.GL_BLEND);
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
fontrenderer.drawStringWithShadow(s2, k1, l1, 16777215 + (i2 << 24));
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
}
--- 997 line
if (this.mc.thePlayer != null)
{
ItemStack itemstack = this.mc.thePlayer.inventory.getCurrentItem();
if (itemstack == null)
{
this.remainingHighlightTicks = 0;
}
else if (this.highlightingItemStack != null && itemstack.getItem() == this.highlightingItemStack.getItem() && ItemStack.areItemStackTagsEqual(itemstack, this.highlightingItemStack) && (itemstack.isItemStackDamageable() || itemstack.getItemDamage() == this.highlightingItemStack.getItemDamage()))
{
if (this.remainingHighlightTicks > 0)
{
--this.remainingHighlightTicks;
}
}
else
{
this.remainingHighlightTicks = 40;
}
this.highlightingItemStack = itemstack;
}