Double jump problem

Started by BIGOOF on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Double jump problem

Hi, I'm working on a mod that adds some enchantments, including one that grants the player the ability to double jump. The problem is that I can't find a way to limit the amount of jumps. I've tried using local variables, but it doesn't seem to have any effect. Might there be a problem with the variables, or do you know a different solution?

 

The procedure

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Why did you make a variable?…
Thu, 03/25/2021 - 16:50

Why did you make a variable? It's useless, you just have to check if certain item has that enchantment. And you have done it that every time you fall you will, supposedly, jump. And the part of the sound just doesn't make sense to me, because it will play the sound eery tick. I think that you need to make it on player's tick update, but try to think about what I've written here. If that¡s not the problem i don't know hao to fix it.

Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
every*
Thu, 03/25/2021 - 16:50

every*

Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Local variables reset every…
Thu, 03/25/2021 - 18:35

Local variables reset every time the procedure is called. You will have to make an NBT variable for this to work properly.

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks!    
Thu, 03/25/2021 - 20:24

thanks!