Started by
RedCorr
on
Topic category: Help with Minecraft modding (Java Edition)
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
anyone?
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.
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