Removing ability to jump

Started by Wooddent on

Topic category: Help with modding (Java Edition)

Last seen on 01:40, 11. Feb 2024
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Removing ability to jump

I want to remove the ability to jump for certain players (as if they were on a honey block) using procedures, how exactly would I do this?

Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a procedure with theā€¦
Mon, 07/17/2023 - 21:25

Create a procedure with the global "player jumps" and set the  procedure with if get block at y-1 is the same as {your block} do "attempt to override motion vector of event/target entity" (found under Entity Management) - set x and z to "x velocity of event/target entity" and "z velocity of event/target entity" respectively (found under Entity data) and set Y to 0. Now when a player is walking on the block, they should not be able to jump at all. Pressing the jump button will do absolutely nothing. 

If you want it to be more like a honey block, add in a wait 1 tick condition and another override motion vector change the Y velocity to 0.2. I found 0.2 was pretty close to the honey block, but you can play around with it to get what you need.

Here's the procedure: https://imgur.com/a/qpGG12D