Кнопка с текстурой

Версия Minecraft
1.5+

jopi

Попрошайка
1,421
30
260
Кнопка с текстурой.
Как-то наткнулся на проект где вот такая менюшка.
1i.png
захотел себе похожее и начал делать, сделал текстуру
2i.png
запускаю а там...
i3.png
Ну она рендерится неправильно... мне надо что-бы она была маленькая но с текстурой полной какую я сделал ://

Класс кнопки:

Код:
package api.fxg.Menu;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;

import org.lwjgl.opengl.GL11;

@SideOnly(Side.CLIENT)
public class GuiSpeciButton extends GuiButton
{   
    public Integer type;
    public GuiSpeciButton(int par1, int par2, int par3, int type)
    {
        super(par1, par2, par3, 16, 12, "");
        this.type = type;
    }

    /**
     * Draws this button to the screen.
     */
    public void drawButton(Minecraft par1Minecraft, int par2, int par3)
    {
        if (this.drawButton)
        {
            par1Minecraft.renderEngine.bindTexture("/mods/fxg/gui/specibutton" + this.type + ".png");
            GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
            boolean flag = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
            int k = 0;

            if (flag)
            {
                k += this.height;
            }

            this.drawTexturedModalRect(this.xPosition, this.yPosition, 0, k, this.width, this.height);
        }
    }
}

И код гуи:
this.buttonList.add(new GuiSpeciButton(1, this.width/3+0, 10, 2));
 
31
2
Код:
    public static void drawPlane(double size)
    {
        drawPlane(size, size);
    }
    public static void drawPlane(double x, double y, double z, double sizeX, double sizeY)
    {
        drawPlaneWithUV(x, y, z, sizeX, sizeY, 0, 0, 1, 1);
    }
    public static void drawPlane(double sizeX, double sizeY)
    {
        drawPlaneWithUV(0, 0, 0, sizeX, sizeY, 0, 0, 1, 1);
    }
    public static void drawPlaneWithUV(double sizeX, double sizeY, double uStart, double vStart, double uSize, double vSize)
    {
        drawPlaneWithUV(0, 0, 0, sizeX, sizeY, uStart, vStart, uSize, vSize);
    }
    public static void drawPlaneWithUV(double x, double y, double z, double sizeX, double sizeY, double uStart, double vStart, double uSize, double vSize)
    {
        Tessellator tessellator = Tessellator.instance;
        tessellator.startDrawingQuads();
        tessellator.addVertexWithUV(x + sizeX, y + sizeY, z, uStart + uSize, vStart + vSize);
        tessellator.addVertexWithUV(x + sizeX, y, z, uStart + uSize, vStart);
        tessellator.addVertexWithUV(x, y, z, uStart, vStart);
        tessellator.addVertexWithUV(x, y + sizeY, z, uStart, vStart + vSize);
        tessellator.draw();
    }
 
Сверху