Started by
TheCopperMiner6
on
Topic category: Help with Minecraft modding (Java Edition)
Hello!
I'm working on adding a custom weapon, but there are 2 things I don't know how to do yet.
- I am trying to add a dash, but I don't know how to move the player in the direction of where they are looking.
- I'm also trying to add a custom animation to the player which also has a couple extra cubes on the model.
If you can answer either of these, thank you so much for the help!
I'm not a big pro at modding myself, but I can definitely answer question 1 because I've dealt with it myself at one point.
For a dash mechanic you need a few blocks in the procedure blockly editor which confused me at first but stay with me I'll try to explain :D
"Attempt to override motion vector of entity to vx vy vz" moves the player in any direction you want.
"X/Y/Z look angle vector of entity" is the look angle.
"X/Y/Z delta movement of entity" is the speed (not exactly but it works fine).
With these you can do stuff like this: https://imgur.com/a/mqeWT5Z
The multiplications are factors with which you can adjust the strenght of your dash. If you want a dash which can also be used on the y axis, you just have to copy the script of the x or z axis.
I did not test this code but I am sure that something like that will be the correct solution for a dash-like mechanic.
For your second question, I am not sure if Mcreator added this feature yet bc I did not read all changelogs but I know that there is a plugin which is called something like "Player Animator" which allows for animating player movements. I do not know how it behaves with a custom player model but ig it should work. Anyways, Someone else should have a better solution than me.
Hope I could help :D
Thanks! That is perfect!