private void drawArrow(float progress) {
double arrowBaseWidth = 0.4D;
double arrowBaseLength = 0.8D;
double arrowLength = 1.5D;
double arrowWidth = 0.7D;
double scale = 0.1D;
GL11.glPushMatrix();
GL11.glScaled(scale, scale, scale);
GL11.glTranslatef(0, progress * 4, 0);
BufferBuilder wr = Tessellator.getInstance().getBuffer();
wr.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION);
wr.pos(-arrowBaseWidth, -arrowLength * 0.5D, 0).endVertex();
wr.pos(-arrowBaseWidth, -arrowLength * 0.5D + arrowBaseLength, 0).endVertex();
wr.pos(-arrowWidth, -arrowLength * 0.5D + arrowBaseLength, 0).endVertex();
wr.pos(0, arrowLength * 0.5D, 0).endVertex();
wr.pos(arrowWidth, -arrowLength * 0.5D + arrowBaseLength, 0).endVertex();
wr.pos(arrowBaseWidth, -arrowLength * 0.5D + arrowBaseLength, 0).endVertex();
wr.pos(arrowBaseWidth, -arrowLength * 0.5D, 0).endVertex();
Tessellator.getInstance().draw();
GL11.glPopMatrix();
}
RenderBlockArrows.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:pnc-repressurized
作者:
评论列表
文章目录