tAPI Alternate item use on right-click?

Hiccup251

Skeletron Prime
I'm trying to make a sword that behaves like a normal sword on left-click, but consumes mana and shoots a projectile on right-click. However, it seems that the only hook in tAPI that calls on right-click is under ModInterface, and I have no idea how to make use of that in context of a specific item. How would I go about implementing this function?
 
You can catch right click everywhere by monitoring Main.mouseRight (true when right button is down), and Main.players[Main.myPlayer].heldItem provides a reference to currently selected item.
 
Back
Top Bottom