Posted December 15, 20168 yr 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.
December 15, 20168 yr 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.
December 15, 20168 yr 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.
December 15, 20168 yr 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.
December 15, 20168 yr 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.