@Override
public void render() {
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(getTexture());
int width = getWidth() + (getParameters() != null && getParameters().length > 0 ? 10 : 0);
int height = getHeight() + (hasStepOutput() ? 10 : 0);
Pair<Double, Double> maxUV = getMaxUV();
double u = maxUV.getLeft();
double v = maxUV.getRight();
BufferBuilder wr = Tessellator.getInstance().getBuffer();
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
wr.pos(0, 0, 0).tex(0, 0).endVertex();
wr.pos(0, height, 0).tex(0, v).endVertex();
wr.pos(width, height, 0).tex(u, v).endVertex();
wr.pos(width, 0, 0).tex(u, 0).endVertex();
Tessellator.getInstance().draw();
}
ProgWidget.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:pnc-repressurized
作者:
评论列表
文章目录