Topic category: Help with Minecraft modding (Java Edition)
Hello!
This is my first ever attempt at modding Minecraft, and I’m currently working on coding a manta ray mob for Minecraft 1.20.1 with Forge. I need some help to improve its AI, animation capabilities, and hitbox.
Here’s a summary of the issues I’m facing and the improvements I’d like to make. If you know the solution to any of these, feel free to share!
Currently, the manta ray stops often. I want it to move for longer periods of time (or indefinitely) without stopping. I tried a fix proposed by Mindthemoods, but it doesn’t seem to work and comes with its own set of issues.
- The manta ray currently only has two animations in-game: idle when on the ground and swim when in water. I want to add a third animation, “looping,” which already exists in the gecko model. This would enable the manta to loop occasionally. I’ve tried multiple approaches, especially using "on tick update" triggers, but:
- All the manta rays do the loop at the same time.
- They never stop doing the loop afterward.
- If I switch back to the swim animation in the code, it doesn’t wait for the loop animation to finish and breaks it at the end.
- When doing the loop animation, the manta's hitbox stays in the same position and doesn’t move upwards, which makes the hitbox much lower than the manta model. (Though this could be a feature, haha!) I want the hitbox to follow the manta’s movement.
- The manta doesn't take damage when in the air, but I want it to. It also freezes, but I want it to keep the swim animation. (I will try to make an idle animation with swimming motion.)
- Finally, is there a way to implement the dolphin’s jumping goal? I tried creating a separate file for it called “MantaJumpGoal,” but I had trouble linking it to MCreator. Even when it seemed to be set up correctly, nothing happened, and I wasn’t able to make the manta jump.
I’ve attached some pictures and videos (note that I don’t have the failed attempts of jumping and animation changes because I made so many modifications that I had to redo everything).
Thanks and cheers !