PlayerSpecials.java 文件源码

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

项目:Chisel-2 作者:
@Override
public void renderExtras(EntityPlayer player, boolean post) {
    if (!post) {
        GL11.glPushMatrix();
        Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
        if (player.isSneaking()) {
            GL11.glRotatef(28.64789F, 1.0F, 0.0F, 0.0F);
        }
        boolean armor = player.getCurrentArmor(1) != null;
        GL11.glRotatef(180.0F, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
        GL11.glTranslatef(-0.25F, -0.85F, armor ? 0.2F : 0.28F);
        GL11.glScalef(0.5F, 0.5F, 0.5F);
        GL11.glColor3f(1.0F, 1.0F, 1.0F);
        int light = 0xF000F0;
        int lightmapX = light % 0x10000;
        int lightmapY = light / 0x10000;
        OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);

        IIcon icon = toRender.getIconIndex();
        ItemRenderer.renderItemIn2D(Tessellator.instance, icon.getMaxU(), icon.getMinV(), icon.getMinU(), icon.getMaxV(), icon.getIconWidth(), icon.getIconHeight(), 1.0F / 16.0F);
        GL11.glPopMatrix();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号