Topic category: Advanced modding
In my mod I have a pair of wings you can craft and put in your inventory. By pressing the 'C' key, you can "flap" with the wings and they send you into the air. The item and the keybind work fine, but it's the procedure of launching the player into the air that I'm having problems with.
I modified the procedure to use "addVelocity" to accomplish this. It worked in MCreator 1.9.0 but is mysteriously broken in 1.9.1. I've looked online for a very long time but haven't come to anything that's worked so far.
The strange part is that the rest of the modified procedure works perfectly. It plays an Ender Dragon wing flap sound and creates some flame particles. That all works. It's only the addVelocity part.
The problem line of code is this:
entity.addVelocity(entity.getLookVec().x, 1.2 + (entity.motionY * -1), entity.getLookVec().z);
where "entity" is referring to the player and getLookVec is used to launch the player in the 'x' and 'z' direction they're looking in.
This is the only place I know to post stuff like this, but if you don't focus on custom code I entirely get it. Thank you for your time nonetheless.