Started by
Jägermeister
on
Topic category: Help with Minecraft modding (Java Edition)
I'm pretty new to MCreator and I'm trying to make a shockwave-esc attack for a hammer weapon. How can I make the player launch into the air on right-click and cause an explosion on landing? Some help would be appreciated.
Attempt to overide motion vector of [event/target entity] [vx] [vy] [vz], where the vx,vy,vz is the change in the entities motion vector in the given direction. I wouldn't set vy to anything above 2 for any practical use (vy of 1 is around 3-5 blocks worth of vertical motion).
If you want to do an explosion on landing, first of all, you might have to find a way to prevent the player from taking damage on impact, (at least briefly.) Secondly, in addition to overriding the motion vector, you could make a procedure that waits about how long it takes for you to hit the ground, checks if the player is on the ground, and generates a non-damaging explosion.
...If you wanted to make it a little more accurate, (as in, executing whenever the player hits the ground after launching, regardless of how high they've launched), add a new player-lifetime variable, (I'll call it 'explosiveness,') that is false by default. Make a procedure that generates an explosion and sets 'explosiveness' to false whenever the player is on the ground, executing every player tick if 'explosiveness' is true for that player. Then, just make the hammer set explosiveness to 'true' for the wielder whenever they use the hammer.