As title, when I use drawTexturedModalRect(), it draw a purple square on the screen. Could anyone tell me what's wrong with my code?
public class playInventoryLockGUI extends GuiInventory {
final ResourceLocation icon_party = new ResourceLocation(Reference.MODID, "textures/icon_party.png");
int u = 1;
int v = 1;
public playInventoryLockGUI(EntityPlayer player)
{
super(player);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
super.drawScreen(mouseX, mouseY, partialTicks);
this.mc.renderEngine.bindTexture(icon_party);
GlStateManager.color(2.0f, 2.0f, 2.0f);
GlStateManager.pushMatrix();
{
GlStateManager.scale(0.5f, 0.5f, 1f);
drawTexturedModalRect(200, 200, u, v, 26, 26 );
}
GlStateManager.popMatrix();
}
}
Screenshot:
Texture: