Example usage for org.lwjgl.opengl GL11 glColor3f

List of usage examples for org.lwjgl.opengl GL11 glColor3f

Introduction

In this page you can find the example usage for org.lwjgl.opengl GL11 glColor3f.

Prototype

public static native void glColor3f(@NativeType("GLfloat") float red, @NativeType("GLfloat") float green,
        @NativeType("GLfloat") float blue);

Source Link

Document

Float version of #glColor3b Color3b

Usage

From source file:rheel.ac.client.renderer.EntityRendererPsychoSlime.java

License:Open Source License

@Override
protected ResourceLocation getSlimeTextures(EntitySlime par1EntitySlime) {
    if (par1EntitySlime instanceof EntityPsychoSlime) {
        ColorFields color = ((EntityPsychoSlime) par1EntitySlime).getColors();
        GL11.glColor3f(color.getRed(), color.getGreen(), color.getBlue());
    }/*  w  w  w  .  j a va  2 s. c o  m*/

    return new ResourceLocation("ac:textures/models/renderers/Slime.png");
}

From source file:runes.Runes.Entites.RenderEskimoZombie.java

License:Open Source License

protected int func_130006_a(EntityLiving par1EntityLiving, int par2, float par3) {
    ItemStack itemstack = par1EntityLiving.func_130225_q(3 - par2);

    if (itemstack != null) {
        Item item = itemstack.getItem();

        if (item instanceof ItemArmor) {
            ItemArmor itemarmor = (ItemArmor) item;
            this.bindTexture(getArmorResource(par1EntityLiving, itemstack, par2, null));
            ModelBiped modelbiped = par2 == 2 ? this.field_82425_h : this.field_82423_g;
            modelbiped.bipedHead.showModel = par2 == 0;
            modelbiped.bipedHeadwear.showModel = par2 == 0;
            modelbiped.bipedBody.showModel = par2 == 1 || par2 == 2;
            modelbiped.bipedRightArm.showModel = par2 == 1;
            modelbiped.bipedLeftArm.showModel = par2 == 1;
            modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
            modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
            modelbiped = ForgeHooksClient.getArmorModel(par1EntityLiving, itemstack, par2, modelbiped);
            this.setRenderPassModel(modelbiped);
            modelbiped.onGround = this.mainModel.onGround;
            modelbiped.isRiding = this.mainModel.isRiding;
            modelbiped.isChild = this.mainModel.isChild;
            float f1 = 1.0F;

            //Move out of if to allow for more then just CLOTH to have color
            int j = itemarmor.getColor(itemstack);
            if (j != -1) {
                float f2 = (float) (j >> 16 & 255) / 255.0F;
                float f3 = (float) (j >> 8 & 255) / 255.0F;
                float f4 = (float) (j & 255) / 255.0F;
                GL11.glColor3f(f1 * f2, f1 * f3, f1 * f4);

                if (itemstack.isItemEnchanted()) {
                    return 31;
                }/* ww  w.  j  ava2 s  .c om*/

                return 16;
            }

            GL11.glColor3f(f1, f1, f1);

            if (itemstack.isItemEnchanted()) {
                return 15;
            }

            return 1;
        }
    }

    return -1;
}

From source file:runes.Runes.Entites.RenderEskimoZombie.java

License:Open Source License

protected void func_130013_c(EntityLiving par1EntityLiving, int par2, float par3) {
    ItemStack itemstack = par1EntityLiving.func_130225_q(3 - par2);

    if (itemstack != null) {
        Item item = itemstack.getItem();

        if (item instanceof ItemArmor) {
            this.bindTexture(getArmorResource(par1EntityLiving, itemstack, par2, "overlay"));
            float f1 = 1.0F;
            GL11.glColor3f(f1, f1, f1);
        }/*from   w w w. j a va  2s .c o m*/
    }
}

From source file:runes.Runes.Entites.RenderEskimoZombie.java

License:Open Source License

public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8,
        float par9) {
    float f2 = 1.0F;
    GL11.glColor3f(f2, f2, f2);
    ItemStack itemstack = par1EntityLiving.getHeldItem();
    this.func_82420_a(par1EntityLiving, itemstack);
    double d3 = par4 - (double) par1EntityLiving.yOffset;

    if (par1EntityLiving.isSneaking()) {
        d3 -= 0.125D;//from   ww  w  .j a va  2 s .  c om
    }

    super.doRenderLiving(par1EntityLiving, par2, d3, par6, par8, par9);
    this.field_82423_g.aimedBow = this.field_82425_h.aimedBow = this.model.aimedBow = false;
    this.field_82423_g.isSneak = this.field_82425_h.isSneak = this.model.isSneak = false;
    this.field_82423_g.heldItemRight = this.field_82425_h.heldItemRight = this.model.heldItemRight = 0;
}

From source file:runes.Runes.Entites.RenderEskimoZombie.java

License:Open Source License

protected void func_130005_c(EntityLiving par1EntityLiving, float par2) {
    float f1 = 1.0F;
    GL11.glColor3f(f1, f1, f1);
    super.renderEquippedItems(par1EntityLiving, par2);
    ItemStack itemstack = par1EntityLiving.getHeldItem();
    ItemStack itemstack1 = par1EntityLiving.func_130225_q(3);
    float f2;/*from  ww  w .  j a  v  a 2s.c  om*/

    if (itemstack1 != null) {
        GL11.glPushMatrix();
        this.model.bipedHead.postRender(0.0625F);

        IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
        boolean is3D = (customRenderer != null
                && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));

        if (itemstack1.getItem() instanceof ItemBlock) {
            if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) {
                f2 = 0.625F;
                GL11.glTranslatef(0.0F, -0.25F, 0.0F);
                GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
                GL11.glScalef(f2, -f2, -f2);
            }

            this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack1, 0);
        } else if (itemstack1.getItem().itemID == Item.skull.itemID) {
            f2 = 1.0625F;
            GL11.glScalef(f2, -f2, -f2);
            String s = "";

            if (itemstack1.hasTagCompound() && itemstack1.getTagCompound().hasKey("SkullOwner")) {
                s = itemstack1.getTagCompound().getString("SkullOwner");
            }

            TileEntitySkullRenderer.skullRenderer.func_82393_a(-0.5F, 0.0F, -0.5F, 1, 180.0F,
                    itemstack1.getItemDamage(), s);
        }

        GL11.glPopMatrix();
    }

    if (itemstack != null) {
        GL11.glPushMatrix();

        if (this.mainModel.isChild) {
            f2 = 0.5F;
            GL11.glTranslatef(0.0F, 0.625F, 0.0F);
            GL11.glRotatef(-20.0F, -1.0F, 0.0F, 0.0F);
            GL11.glScalef(f2, f2, f2);
        }

        this.model.bipedRightArm.postRender(0.0625F);
        GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);

        IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
        boolean is3D = (customRenderer != null
                && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));

        if (itemstack.getItem() instanceof ItemBlock
                && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))) {
            f2 = 0.5F;
            GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
            f2 *= 0.75F;
            GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
            GL11.glScalef(-f2, -f2, f2);
        } else if (itemstack.itemID == Item.bow.itemID) {
            f2 = 0.625F;
            GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
            GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F);
            GL11.glScalef(f2, -f2, f2);
            GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        } else if (Item.itemsList[itemstack.itemID].isFull3D()) {
            f2 = 0.625F;

            if (Item.itemsList[itemstack.itemID].shouldRotateAroundWhenRendering()) {
                GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
                GL11.glTranslatef(0.0F, -0.125F, 0.0F);
            }

            this.func_82422_c();
            GL11.glScalef(f2, -f2, f2);
            GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        } else {
            f2 = 0.375F;
            GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
            GL11.glScalef(f2, f2, f2);
            GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F);
        }

        this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, 0);

        if (itemstack.getItem().requiresMultipleRenderPasses()) {
            for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) {
                this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, x);
            }
        }

        GL11.glPopMatrix();
    }
}

From source file:sanandreasp.mods.ClaySoldiersMod.client.model.ModelClayMan.java

License:Creative Commons License

@Override
public void render(Entity e, float f, float f1, float f2, float f3, float f4, float f5) {
    setRotationAngles(f, f1, f2, f3, f4, f5, e);
    bipedHead.render(f5);/*from  www.  ja v a 2  s  . c  o m*/
    bipedBody.render(f5);
    bipedRightArm.render(f5);
    bipedLeftArm.render(f5);
    bipedRightLeg.render(f5);
    bipedLeftLeg.render(f5);

    if (hasCrown) {
        GL11.glPushMatrix();
        GL11.glColor3f(1F, 1F, 0F);
        bipedHeadwear.render(f5);
        GL11.glColor3f(1F, 1F, 1F);
        GL11.glPopMatrix();
    }

    if (isSuper && !hasCrown) {
        GL11.glPushMatrix();
        GL11.glColor3f(0.4F, 1F, 1F);
        bipedHeadwear.render(f5);
        GL11.glColor3f(1F, 1F, 1F);
        GL11.glPopMatrix();
    }

    //      if (hasStick) {
    //         stick.render(f5);
    //         if (isSharpened) {
    //            stickSharp.render(f5);
    //         } else {
    //            stickBlunt.render(f5);
    //         }
    //      }

    if (hasArmor) {
        bipedChest.render(f5);
        bipedRightArmor.render(f5);
        bipedLeftArmor.render(f5);
        if (isPadded) {
            GL11.glPushMatrix();
            GL11.glColor3f(colorPadded[0], colorPadded[1], colorPadded[2]);
            bipedPadding.render(f5);
            bipedRightPadding.render(f5);
            bipedLeftPadding.render(f5);
            GL11.glColor3f(1F, 1F, 1F);
            GL11.glPopMatrix();
        }
    }

    if (hasPants) {
        RightLegArmor.render(f5);
        LeftLegArmor.render(f5);
        bipedChest2.render(f5);
    }

    if (hasSpecks) {
        speckyHead.render(f5);
        speckyBody.render(f5);
        speckyRightArm.render(f5);
        speckyLeftArm.render(f5);
        speckyRightLeg.render(f5);
        speckyLeftLeg.render(f5);
    }

    if (isGooey) {
        gooBase.render(f5);
    }

    if (hasLogs) {
        logBase.render(f5);
    }

    if (hasRocks) {
        bipedRock.render(f5);
    }

    if (hasGoggles) {
        bipedGoggle.render(f5);
        bipedGoggle2.render(f5);
        bipedStrap.render(f5);
    }

    if (isSuper || isCaped) {
        bipedCape.rotateAngleX = -capeSwing * 1.25F;
        bipedCape.rotateAngleY = 3.141593F;
        GL11.glPushMatrix();
        if (isSuper) {
            GL11.glColor3f(0.4F, 1F, 1F);
        } else {
            GL11.glColor3f(capePadded[0], capePadded[1], capePadded[2]);
        }
        bipedCape.render(f5);
        GL11.glColor3f(1F, 1F, 1F);
        GL11.glPopMatrix();
    }
}

From source file:sanandreasp.mods.ClaySoldiersMod.client.model.ModelClayNexus.java

License:Creative Commons License

@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
    super.render(entity, f, f1, f2, f3, f4, f5);
    setRotationAngles(f, f1, f2, f3, f4, f5, entity);
    base.render(f5);/*  w  w  w .j a v a  2 s  . co m*/
    arm1.render(f5);
    arm2.render(f5);
    arm3.render(f5);
    arm4.render(f5);

    if (isSpawnable) {
        if (isActive) {
            orb.rotateAngleX = ((EntityClayNexus) entity).innerRotation / 12F;
            orb.rotateAngleZ = ((EntityClayNexus) entity).innerRotation / 7F;
            orb.rotateAngleY = ((EntityClayNexus) entity).innerRotation / 10.5F;

            orb.rotationPointY = (float) (19F + Math.sin(((EntityClayNexus) entity).innerRotation / 15F));
        }

        float[] color = ((EntityClayNexus) entity).getTeamColor();
        GL11.glColor3f(color[0], color[1], color[2]);
        orb.render(f5);
        GL11.glColor3f(1F, 1F, 1F);
    }
}

From source file:sqr.client.render.RenderSpiderQueen.java

License:Open Source License

@Override
public void doRender(AbstractClientPlayer clientPlayer, double posX, double posY, double posZ,
        float rotationYaw, float rotationPitch) {
    GL11.glColor3f(1.0F, 1.0F, 1.0F);

    if (clientPlayer.isSneaking() && !(clientPlayer instanceof EntityPlayerSP)) {
    }/*from w  ww.  ja  v  a  2s .c  o  m*/

    GL11.glPushMatrix();
    {
        final EntityLivingBase entity = clientPlayer;

        GL11.glDisable(GL11.GL_CULL_FACE);
        mainModel.onGround = renderSwingProgress(entity, rotationPitch);

        if (renderPassModel != null) {
            renderPassModel.onGround = mainModel.onGround;
        }

        mainModel.isRiding = entity.isRiding();

        if (renderPassModel != null) {
            renderPassModel.isRiding = mainModel.isRiding;
        }

        if (clientPlayer != Minecraft.getMinecraft().thePlayer) {
            GL11.glTranslatef(0, 1.7F, 0);
        }

        try {
            final float unknownConstant = -0.0925F;

            final float realRotationPitch = entity.prevRotationPitch
                    + (entity.rotationPitch - entity.prevRotationPitch) * rotationPitch;
            float realRenderYaw = interpolateRotation(entity.prevRenderYawOffset, entity.renderYawOffset,
                    rotationPitch);
            final float realRenderYawHead = interpolateRotation(entity.prevRotationYawHead,
                    entity.rotationYawHead, rotationPitch);
            float wrappedRotation = handleRotationFloat(entity, rotationPitch);

            if (entity.isRiding() && entity.ridingEntity instanceof EntityLivingBase) {
                final EntityLivingBase entityRiding = (EntityLivingBase) entity.ridingEntity;
                realRenderYaw = interpolateRotation(entityRiding.prevRenderYawOffset,
                        entityRiding.renderYawOffset, rotationPitch);
                wrappedRotation = MathHelper.wrapAngleTo180_float(realRenderYawHead - realRenderYaw);

                if (wrappedRotation < -85.0F) {
                    wrappedRotation = -85.0F;
                }

                if (wrappedRotation >= 85.0F) {
                    wrappedRotation = 85.0F;
                }

                realRenderYaw = realRenderYawHead - wrappedRotation;

                if (wrappedRotation * wrappedRotation > 2500.0F) {
                    realRenderYaw += wrappedRotation * 0.2F;
                }
            }

            renderLivingAt(entity, posX, posY, posZ);
            rotateCorpse(entity, wrappedRotation, realRenderYaw, rotationPitch);

            GL11.glTranslatef(0.0F, -0.10F, 0.0F); // Move the model down
            // slightly so that it
            // touches the ground.
            GL11.glScalef(0.7F, 0.7F, -0.7F); // Scale and flip the new
            // model.

            float limbSwing = entity.prevLimbSwingAmount
                    + (entity.limbSwingAmount - entity.prevLimbSwingAmount) * rotationPitch;
            final float limbAngle = entity.limbSwing - entity.limbSwingAmount * (1.0F - rotationPitch);

            if (limbSwing > 1.0F) {
                limbSwing = 1.0F;
            }

            mainModel.setLivingAnimations(entity, limbAngle, limbSwing, rotationPitch);
            renderModel(entity, limbAngle, limbSwing, wrappedRotation, realRenderYawHead - realRenderYaw,
                    realRotationPitch, unknownConstant);
            try {
                renderEquippedItems(entity, limbSwing);
            }

            catch (Throwable e) {
                e.printStackTrace();
            }

            final float brightness = entity.getBrightness(rotationPitch);
            final int colorMultiplier = getColorMultiplier(entity, brightness, rotationPitch);

            if ((colorMultiplier >> 24 & 255) > 0 || entity.hurtTime > 0 || entity.deathTime > 0) {
                GL11.glDisable(GL11.GL_TEXTURE_2D);
                GL11.glDisable(GL11.GL_ALPHA_TEST);
                GL11.glEnable(GL11.GL_BLEND);
                GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
                GL11.glDepthFunc(GL11.GL_EQUAL);

                if (entity.hurtTime > 0 || entity.deathTime > 0) {
                    GL11.glColor4f(brightness, 0.0F, 0.0F, 0.4F);
                    mainModel.render(entity, limbAngle, limbSwing, wrappedRotation,
                            realRenderYawHead - realRenderYaw, realRotationPitch, unknownConstant);
                }

                if ((colorMultiplier >> 24 & 255) > 0) {
                    final float colorR = (colorMultiplier >> 16 & 255) / 255.0F;
                    final float colorG = (colorMultiplier >> 8 & 255) / 255.0F;
                    final float colorB = (colorMultiplier & 255) / 255.0F;
                    final float colorA = (colorMultiplier >> 24 & 255) / 255.0F;
                    GL11.glColor4f(colorR, colorG, colorB, colorA);
                    mainModel.render(entity, limbAngle, limbSwing, wrappedRotation,
                            realRenderYawHead - realRenderYaw, realRotationPitch, unknownConstant);
                }

                GL11.glDepthFunc(GL11.GL_LEQUAL);
                GL11.glDisable(GL11.GL_BLEND);
                GL11.glEnable(GL11.GL_ALPHA_TEST);
                GL11.glEnable(GL11.GL_TEXTURE_2D);
            }
        }

        catch (final Exception exception) {
            System.out.println("Failure to render entity. " + exception.getMessage());
        }
    }
    GL11.glPopMatrix();
}

From source file:sqr.client.render.RenderSpiderQueen.java

License:Open Source License

@Override
public void renderFirstPersonArm(EntityPlayer entityPlayer) {
    GL11.glColor3f(1.0F, 1.0F, 1.0F);
    modelBipedMain.onGround = 0.0F;/*  ww w .j  a v a 2  s.co m*/
    modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, entityPlayer);

    GL11.glPushMatrix();
    {
        GL11.glScalef(0.7F, 0.9F, 0.7F);
        GL11.glTranslated(-0.3D, 0.1D, 0.0D);

        try {
            final ModPropertiesList modPropertiesList = SpiderQueen.getInstance().getModProperties();
            bindTexture(new ResourceLocation(
                    "spiderqueen:textures/entity/Arms" + modPropertiesList.spiderSkin.substring(6) + ".png"));
        }

        catch (NullPointerException e) {
            //Happens sometimes just when the player is logging in.
        }

        modelFirstPerson.bipedRightArm.render(0.0625F);
    }
    GL11.glPopMatrix();
}

From source file:sqr.client.render.RenderSpiderQueen.java

License:Open Source License

@Override
public void renderEquippedItems(AbstractClientPlayer clientPlayer, float partialTickTime) {
    RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(clientPlayer, this,
            partialTickTime);/*ww  w. j a v  a  2 s. c o  m*/

    if (MinecraftForge.EVENT_BUS.post(event)) {
        return;
    }

    GL11.glColor3f(1.0F, 1.0F, 1.0F);
    GL11.glScaled(-1, -1, -1);
    GL11.glTranslated(-0.05D, 0.3D, -0.15D);
    super.renderArrowsStuckInEntity(clientPlayer, partialTickTime);
    ItemStack itemstack = clientPlayer.inventory.armorItemInSlot(3);

    if (itemstack != null && event.renderHelmet) {
        GL11.glPushMatrix();
        this.modelBipedMain.head.postRender(0.0625F);
        float f1;

        if (itemstack.getItem() instanceof ItemBlock) {
            IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
            boolean is3D = (customRenderer != null
                    && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));

            if (is3D || RenderBlocks
                    .renderItemIn3d(Block.getBlockFromItem(itemstack.getItem()).getRenderType())) {
                f1 = 0.625F;
                GL11.glTranslatef(0.0F, -0.25F, 0.0F);
                GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
                GL11.glScalef(f1, -f1, -f1);
            }

            this.renderManager.itemRenderer.renderItem(clientPlayer, itemstack, 0);
        } else if (itemstack.getItem() == Items.skull) {
            f1 = 1.0625F;
            GL11.glScalef(f1, -f1, -f1);
            GameProfile gameprofile = null;

            if (itemstack.hasTagCompound()) {
                NBTTagCompound nbttagcompound = itemstack.getTagCompound();

                if (nbttagcompound.hasKey("SkullOwner", 10)) {
                    gameprofile = NBTUtil.func_152459_a(nbttagcompound.getCompoundTag("SkullOwner"));
                } else if (nbttagcompound.hasKey("SkullOwner", 8)
                        && !StringUtils.isNullOrEmpty(nbttagcompound.getString("SkullOwner"))) {
                    gameprofile = new GameProfile((UUID) null, nbttagcompound.getString("SkullOwner"));
                }
            }

            TileEntitySkullRenderer.field_147536_b.func_152674_a(-0.5F, 0.0F, -0.5F, 1, 180.0F,
                    itemstack.getItemDamage(), gameprofile);
        }

        GL11.glPopMatrix();
    }

    float f3;

    if (clientPlayer.getCommandSenderName().equals("deadmau5") && clientPlayer.func_152123_o()) {
        this.bindTexture(clientPlayer.getLocationSkin());

        for (int j = 0; j < 2; ++j) {
            float f10 = clientPlayer.prevRotationYaw
                    + (clientPlayer.rotationYaw - clientPlayer.prevRotationYaw) * partialTickTime
                    - (clientPlayer.prevRenderYawOffset
                            + (clientPlayer.renderYawOffset - clientPlayer.prevRenderYawOffset)
                                    * partialTickTime);
            float f2 = clientPlayer.prevRotationPitch
                    + (clientPlayer.rotationPitch - clientPlayer.prevRotationPitch) * partialTickTime;
            GL11.glPushMatrix();
            GL11.glRotatef(f10, 0.0F, 1.0F, 0.0F);
            GL11.glRotatef(f2, 1.0F, 0.0F, 0.0F);
            GL11.glTranslatef(0.375F * (float) (j * 2 - 1), 0.0F, 0.0F);
            GL11.glTranslatef(0.0F, -0.375F, 0.0F);
            GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(-f10, 0.0F, 1.0F, 0.0F);
            f3 = 1.3333334F;
            GL11.glScalef(f3, f3, f3);
            GL11.glPopMatrix();
        }
    }

    boolean flag = clientPlayer.func_152122_n();
    flag = event.renderCape && flag;
    float f5;

    if (flag && !clientPlayer.isInvisible() && !clientPlayer.getHideCape()) {
        this.bindTexture(clientPlayer.getLocationCape());
        GL11.glPushMatrix();
        GL11.glTranslatef(0.0F, 0.0F, 0.125F);
        double d3 = clientPlayer.field_71091_bM
                + (clientPlayer.field_71094_bP - clientPlayer.field_71091_bM) * (double) partialTickTime
                - (clientPlayer.prevPosX
                        + (clientPlayer.posX - clientPlayer.prevPosX) * (double) partialTickTime);
        double d4 = clientPlayer.field_71096_bN
                + (clientPlayer.field_71095_bQ - clientPlayer.field_71096_bN) * (double) partialTickTime
                - (clientPlayer.prevPosY
                        + (clientPlayer.posY - clientPlayer.prevPosY) * (double) partialTickTime);
        double d0 = clientPlayer.field_71097_bO
                + (clientPlayer.field_71085_bR - clientPlayer.field_71097_bO) * (double) partialTickTime
                - (clientPlayer.prevPosZ
                        + (clientPlayer.posZ - clientPlayer.prevPosZ) * (double) partialTickTime);
        f5 = clientPlayer.prevRenderYawOffset
                + (clientPlayer.renderYawOffset - clientPlayer.prevRenderYawOffset) * partialTickTime;
        double d1 = (double) MathHelper.sin(f5 * (float) Math.PI / 180.0F);
        double d2 = (double) (-MathHelper.cos(f5 * (float) Math.PI / 180.0F));
        float f6 = (float) d4 * 10.0F;

        if (f6 < -6.0F) {
            f6 = -6.0F;
        }

        if (f6 > 32.0F) {
            f6 = 32.0F;
        }

        float f7 = (float) (d3 * d1 + d0 * d2) * 100.0F;
        float f8 = (float) (d3 * d2 - d0 * d1) * 100.0F;

        if (f7 < 0.0F) {
            f7 = 0.0F;
        }

        float f9 = clientPlayer.prevCameraYaw
                + (clientPlayer.cameraYaw - clientPlayer.prevCameraYaw) * partialTickTime;
        f6 += MathHelper.sin((clientPlayer.prevDistanceWalkedModified
                + (clientPlayer.distanceWalkedModified - clientPlayer.prevDistanceWalkedModified)
                        * partialTickTime)
                * 6.0F) * 32.0F * f9;

        if (clientPlayer.isSneaking()) {
            f6 += 25.0F;
        }

        GL11.glRotatef(6.0F + f7 / 2.0F + f6, 1.0F, 0.0F, 0.0F);
        GL11.glRotatef(f8 / 2.0F, 0.0F, 0.0F, 1.0F);
        GL11.glRotatef(-f8 / 2.0F, 0.0F, 1.0F, 0.0F);
        GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
        GL11.glPopMatrix();
    }

    ItemStack itemstack1 = clientPlayer.inventory.getCurrentItem();

    if (itemstack1 != null && event.renderItem) {
        GL11.glPushMatrix();
        this.modelBipedMain.armRight.postRender(0.0625F);
        GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);

        if (clientPlayer.fishEntity != null) {
            itemstack1 = new ItemStack(Items.stick);
        }

        EnumAction enumaction = null;

        if (clientPlayer.getItemInUseCount() > 0) {
            enumaction = itemstack1.getItemUseAction();
        }

        IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
        boolean is3D = (customRenderer != null
                && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));

        if (is3D || itemstack1.getItem() instanceof ItemBlock
                && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(itemstack1.getItem()).getRenderType())) {
            f3 = 0.5F;
            GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
            f3 *= 0.75F;
            GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
            GL11.glScalef(-f3, -f3, f3);
        } else if (itemstack1.getItem() == Items.bow) {
            f3 = 0.625F;
            GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
            GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F);
            GL11.glScalef(f3, -f3, f3);
            GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        } else if (itemstack1.getItem().isFull3D()) {
            f3 = 0.625F;

            if (itemstack1.getItem().shouldRotateAroundWhenRendering()) {
                GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
                GL11.glTranslatef(0.0F, -0.125F, 0.0F);
            }

            if (clientPlayer.getItemInUseCount() > 0 && enumaction == EnumAction.block) {
                GL11.glTranslatef(0.05F, 0.0F, -0.1F);
                GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
                GL11.glRotatef(-10.0F, 1.0F, 0.0F, 0.0F);
                GL11.glRotatef(-60.0F, 0.0F, 0.0F, 1.0F);
            }

            GL11.glTranslatef(0.0F, 0.1875F, 0.0F);
            GL11.glScalef(f3, -f3, f3);
            GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
        } else {
            f3 = 0.375F;
            GL11.glTranslatef(0.25F, 0.1875F, -0.1875F);
            GL11.glScalef(f3, f3, f3);
            GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F);
            GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F);
            GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F);
        }

        float f4;
        float f12;
        int k;

        if (itemstack1.getItem().requiresMultipleRenderPasses()) {
            for (k = 0; k <= itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++k) {
                int i = itemstack1.getItem().getColorFromItemStack(itemstack1, k);
                f12 = (float) (i >> 16 & 255) / 255.0F;
                f4 = (float) (i >> 8 & 255) / 255.0F;
                f5 = (float) (i & 255) / 255.0F;
                GL11.glColor4f(f12, f4, f5, 1.0F);
                this.renderManager.itemRenderer.renderItem(clientPlayer, itemstack1, k);
            }
        } else {
            k = itemstack1.getItem().getColorFromItemStack(itemstack1, 0);
            float f11 = (float) (k >> 16 & 255) / 255.0F;
            f12 = (float) (k >> 8 & 255) / 255.0F;
            f4 = (float) (k & 255) / 255.0F;
            GL11.glColor4f(f11, f12, f4, 1.0F);
            this.renderManager.itemRenderer.renderItem(clientPlayer, itemstack1, 0);
        }

        GL11.glPopMatrix();
    }
    MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(clientPlayer, this, partialTickTime));
}