How do you make yourself jump with right click?

Started by Jägermeister on

Topic category: Help with modding (Java Edition)

Last seen on 08:08, 10. Jul 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you make yourself jump with right click?

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.

Last seen on 04:08, 25. Apr 2024
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Attempt to overide motion…
Sun, 07/03/2022 - 02:59

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).

Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you want to do an…
Sun, 07/31/2022 - 13:43

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.