MinecraftForge/MinecraftForge — pull request #323 by mDiyo (2012-12-19 13:27:53+00:00)
Title: Attempt #2 at fixing multi-pass items

The first PR had edits in two places for inventory and in-world texture bind fixes, but only the in-world version made it. This PR contains the inventory fix and allows passes to set textures in the same pass.

The change is simple: the texture is bound after getIconIndex ( GL11.glBindTexture is moved down 2-3 lines), and can be used like so:

public String getTextureFile()
{
return texture;
}

public int getIconIndex(ItemStack stack, int pass)
{
if (pass == 0)
{
texture = texture1;
[code]
}

if (pass == 1)
{
texture = texture2;
[code]
}

if (pass == 2)
{
texture = texture3;
[code]
}
}