Modification Items.

Started by RedCorr on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Sep 2019
Points:
897

User statistics:

  • Modifications: 0
  • Forum topics: 40
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 115
Modification Items.
Sat, 06/13/2020 - 18:11 (edited)

Can i do some items, that, for example...
Well, i want to make item for double jump.
If you press Space for one jump, and then press Space again, you will jump again.
Can i do that?

Edited by RedCorr on Sat, 06/13/2020 - 18:11
Active 2 years ago
Joined Sep 2019
Points:
897

User statistics:

  • Modifications: 0
  • Forum topics: 40
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 115
anyone?
Sat, 06/13/2020 - 20:11

anyone?

Active 1 year ago
Joined May 2020
Points:
667

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 57
There is no current way to…
Sun, 06/14/2020 - 03:19

There is no current way to verify if you pressed a not custom button in mcreator, what I recommend is to create a custom button for that will performe the double jump, when button pressed set player nbt logic doublejump to true, and create a procedure on player tick update as the image

https://imgur.com/a/1fc8vkB

Didn't tested it, any problems reply me, if you want to set a delay between each double jump use a global timer, mess up with the values to change high and time of jump.

Active 6 months ago
Joined May 2014
Points:
1035

User statistics:

  • Modifications: 3
  • Forum topics: 24
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 330
This isn't entirely true…
Fri, 07/17/2020 - 04:29

This isn't entirely true. You can bing custom keybindings to the spacebar. All that really need to be done is to test for whether or not the player is on the ground and execute the procedure accordingly.

The easiest way to test if the player is on the ground is by getting their Y velocity- if it is anything other than 0, then they aren't on solid ground.

I have used a similar strategy to this to achieve a double jump using the spacebar in a mod of my own. I did end up using some custom code that was not included in MCreator, but that was just for some extra foolproofing. Nothing essential