Started by
TheGunner5712
on
Topic category: Help with Minecraft modding (Java Edition)
Hi guys, currently I want to make an enchantment called Dash. It works like the camel dash mechanic in Minecraft, using a key binding (x by default). But now I'm having some problems with the keybinding procedure. Image here: https://imgur.com/3Louhi
Btw i also used tutorials by Cursed Warrior and Kyoukster Mcreator and combined them together.
*Edit: I just solved the problem, thx to Sin Costan comment, i try to search on Youtube tutorial about timer, and then find a way to fixed it by using nbt timer. Then i just combined it with the procedure i already have. The link of the vid i use here: https://www.youtube.com/watch?v=NuxllOka6p0
Edited by TheGunner5712 on Fri, 11/29/2024 - 16:22
In the green block at the top of the procedute, change "On Player tick Update" to No Additional Trigger
Thanks for the reply, but after correcting the procedure I encountered another problem. When set to "On player tick update", it will continuously Dash every time the cooldown expires without having to press the key binding. But when I change it to "No additional trigger", the key binding cannot work. How do i fix this error
if you click on your keybind, is it still showing that the procedure is assigned to that key?
since you're using a wait block i'd imagine it probably isn't changing the tag back to false (for example, if you leave the game before the cooldown is over, then the cooldown is effectively infinite and you can't use the ability again)
easiest solution would be to just use the item cooldown block on the boots and make sure the boots aren't on cooldown when checking it again
you could also use potion effects or a dedicated procedure for the cooldown, if you plan on adding more abilities that have cooldowns
Ok i just fix the key binding part, turns out that i just forgot to add the "Keybind on pressed" procedure to the Keybind element XD. Now i'll try to to make the cooldown doesn't become infinite
btw do any of u guys have any idea to make the cooldown doesn't become infinite?