Started by
Cromo
on
Topic category: Help with Minecraft modding (Java Edition)
Hello! First off, I'm Brazilian, so if my English is not much improved and you can't understand much, forgive me.
Anyway, what I would like to know is how do I get an item in hand to click on a key and an event happens! Example: I have a custom MCreator item on hand and when I press a key, it does a designated action.
It is possible?
Use key binding and check for item in mainhand procedure inside key binding element procedure to check for the item.
Sorry, but I do not understand very well!
First, I need to go to the desired item, go to when he is using the item and in this procedure I assign the key that will perform the action?
If you want the key binding to only work when player has item in hand, you need to define all this logic in key binding procedure where you check if the item in main hand is your desired action and put the key binding action in the if statement.