Jump to content

[1.10.2] - Custom Chicken always flapping


TheClaus

Recommended Posts

I have an issue I created a custom chicken and notice that when I spawn it in game it just flaps.  Actually it isn't flapping and more as the wings just rotate over and over.

 

Here is my entity code for it: http://pastebin.com/PciVYNUS

 

Here is the chicken in action: http://imgur.com/a/rM9In

 

Wondering how to prevent that from happening and to act like a normal chicken would.

Link to comment
Share on other sites

I am guessing the chicken flapping is controlled from chicken renderer. So when you copypasta'd the chicken code you didn't copypasta the renderer code.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

right . so if you check the vanilla chicken renderer it has this function

 

    protected float handleRotationFloat(EntityChicken livingBase, float partialTicks)

    {

        float f = livingBase.oFlap + (livingBase.wingRotation - livingBase.oFlap) * partialTicks;

        float f1 = livingBase.oFlapSpeed + (livingBase.destPos - livingBase.oFlapSpeed) * partialTicks;

        return (MathHelper.sin(f) + 1.0F) * f1;

    }

 

which looks to me like it handles wing flapping

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

package net.minecraft.client.renderer.entity;

 

look for RenderChicken.class

 

 

As I said you copypasta the model but not the whole renderer.

 

Most of the specific motions and animations are done outside the model in the renderer

 

EDIT : when i made my custom wolf the tail would spin in a circle helicopter  style forever . I had to spend a bit of time with code try to understand how is actually done then I realize I was missing some code cause I made the renderer myself instead of looking what was already there

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

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.