Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

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.

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.

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.

  • Author

Thanks so much.  When I created the Renderer for it I couldn't extend RenderChicken and went with RenderLiving.  I added the method that I missed and it worked great.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.