Jump to content

[1.7.2] Custom Bow / Arrow Need help! [SOLVED / FIXED]


Recommended Posts

Posted

Hello everyone, i am looking help with Custom Bow & Arrow. I am not a begginer, just want to say that. But the problem is not in the making one i can make it and Works good but the only problem is some kind of weird Lag"lagg" or rotation of it, when i shot the bow-arrow. It only happens when i am in survival with custom arrow and custom bow. When its creative it Works fine.

 

Picture example:

Normal Bow/Arrow shot:

EcL4IsA.png

Custom Bow/Arrow shot ( Lag rotation or something )

jtrPQU2.png

 

Main File:

 

  Reveal hidden contents

 

 

ClientProxy File:

 

  Reveal hidden contents

 

 

Custom Bow Item:

 

  Reveal hidden contents

 

 

Custom Arrow Entity:

 

  Reveal hidden contents

 

 

Custom Arrow Render:

 

  Reveal hidden contents

 

 

If anyone has the same problem Solved/Fixed line is in the comments.

Thanks for the help.

 

 

Posted

Bump, anyone ?

 

Also this weird rotation when right click / throw items/ entitys happen for everything . So idk do i have something broken.

edit: Every items has the same  main file. ""EntityRegistry.registerModEntity(EntityBolt.class, "bolt", 4010, this, 1000, 1, true);""

Posted
  On 5/12/2014 at 4:13 PM, proalt said:

 

  Reveal hidden contents

 

I think it is has to do with GL11.glRotatef(par1EntityBolt.prevRotationYaw + (par1EntityBolt.rotationYaw - par1EntityBolt.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);

 

Maybe  GL11.glRotatef(par1EntityBolt.prevRotationYaw + (par1EntityBolt.rotationYaw - par1EntityBolt.prevRotationYaw) * par9, 0.0F, 1.0F, 0.0F); is correct.

 

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted
  On 5/12/2014 at 11:32 PM, GotoLink said:

If you extend EntityArrow, do not copy everything that is inside it.

  Quote

  Quote

 

  Reveal hidden contents

 

I think it is has to do with GL11.glRotatef(par1EntityBolt.prevRotationYaw + (par1EntityBolt.rotationYaw - par1EntityBolt.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);

 

Maybe  GL11.glRotatef(par1EntityBolt.prevRotationYaw + (par1EntityBolt.rotationYaw - par1EntityBolt.prevRotationYaw) * par9, 0.0F, 1.0F, 0.0F); is correct.

 

Thanks for the help i fixed it by adding this:

 

public void renderArrow(EntityBolt entitybolt, double d, double d1, double d2, float f, float f1)

    {

    if (entitybolt.prevRotationYaw == 0.0F && entitybolt.prevRotationPitch == 0.0F)

        {

            return;

        }

}

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.