Jump to content

Swing Progress ItemRenderer Helper


micdoodle8

Recommended Posts

Pretty self-explanatory. I'd like to see this implemented into IItemRenderer, which lets you decide whether you want the item to render the swing progress or not.

 

    public enum ItemRendererHelper
    {
        + SWING_PROGRESS
    }

 

public void renderItemInFirstPerson(float par1)
    {
...
if (custom.shouldUseRenderHelper(FIRST_PERSON_MAP, var14, SWING_PROGRESS))
            {
            var7 = 0.8F;
            var17 = var3.getSwingProgress(par1);
            var18 = MathHelper.sin(var17 * (float)Math.PI);
            var10 = MathHelper.sin(MathHelper.sqrt_float(var17) * (float)Math.PI);
            GL11.glTranslatef(-var10 * 0.4F, MathHelper.sin(MathHelper.sqrt_float(var17) * (float)Math.PI * 2.0F) * 0.2F, -var18 * 0.2F);
            var17 = 1.0F - var4 / 45.0F + 0.1F;

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

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

            var17 = -MathHelper.cos(var17 * (float)Math.PI) * 0.5F + 0.5F;
            GL11.glTranslatef(0.0F, 0.0F * var7 - (1.0F - var2) * 1.2F - var17 * 0.5F + 0.04F, -0.9F * var7);
            GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F);
            GL11.glRotatef(var17 * -85.0F, 0.0F, 0.0F, 1.0F);
            }
...

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.