TileEntitySpinningWheelRenderer.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:MineFantasy 作者:
private void renderWheel(TileEntitySpinningWheel tile, int x, int y, int w, int h, int tw, int th) {
    Minecraft mc = Minecraft.getMinecraft();

    float f = 0.01F / (float)tw;
       float f1 = 0.01F / (float)th;

    float x1 = (float)x / (float)tw + f;
    float x2 = (float)(x + w) / tw - f;
    float y1 = (float)y / th + f1;
    float y2 = (float)(y + h) / th - f1;

       Tessellator image = Tessellator.instance;
       float xPos = 0.5F;
       float yPos = 0.5F;
       GL11.glEnable(GL12.GL_RESCALE_NORMAL);
       GL11.glTranslatef(-xPos, -yPos, pixel(0.5F));
       float var13 = 1F;
       GL11.glScalef(var13, var13, var13);
       GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
       GL11.glTranslatef(-1F, -1F, 0.0F);
       ItemRenderer.renderItemIn2D(image, x2, y1, x1, y2, tw, th, 0.0625F);

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号