Started by
DragonOfAsparas
on
Topic category: Help with Minecraft modding (Java Edition)
So i'm trying to make a flying mob and everything works fine except that i have no idea how to make the wings go up and down... They go to the front and back but i need to them to go up and down. Anyone had an idea how to change this?
Thanx
Do you know how to make mobs fly? If so can you please help me?
@thesloth It's really easy to do :) first you create a mob. I usually choose it to make it a creature or ambient one. After that you go to the AI of the mob and you pick bat, unless you want a hostile flying mob tell me and i'll explain that aswell. Whwn u selected bat as AI dont select any AI options like wander or such since that will give you errors. After you're done with creating it you will most likely get an error because mcreator sets the wander AI by default i think? So you go to the code screen of your flying mob and look for the AI tasks, you will see things such as : this AI task wander etc. Remove all the AI tasks and click save and build. You should be good to go :) if you need any other help with mob AI feel free to ask :)
Thank you I'll give it a go.
@#2 hey can you tell me how to make a hostile flying mob?
The mob animation code lines are at the bottom of the mob code.
You have to look for something like: this.yourwingname.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1
This will make move your wing along the X axis (rotateAngleX), so try to change that X into a Y (or Z sorry I cannot remember :P )
What if I wanted the mob to be aggressive?
Im trying to use this code but doesnt work.
Is somthing like:
this.leftWing.rotateAngleZ = MathHelper.cos(f * 1.0F) * -1.0F * f1;
this.rightWing.rotateAngleZ = MathHelper.cos(f * 0.6662F + (float) Math.PI) * f1;
Could you also change the amount of rotation the wing does? If so, how?