Codasylph Posted February 13, 2018 Posted February 13, 2018 (edited) I have a multi purpose tool in my mod (i.e. it does different things depending on whether you click in the air with it, or on a block, what kind of block, etc.) I'm wondering if there is any simple, reasonable way to prevent my code in Item#onItemRightClick from firing if Item#onItemUse already has. I know from testing that onItemUse fires first, and doesn't fire if the user is clicking on air as opposed to a block (which nixes my brilliant plan of putting all the functionality in onItemUse.) I'm mostly just trying to prevent chat spam for the user because onItemRightClick sends a chat message to the client with information about the surroundings, and I think this will become irritating if the user is trying to use the tool to do something like adjust settings on one of my blocks which may involve a lot of clicking. Edited February 13, 2018 by Codasylph Quote
Codasylph Posted February 14, 2018 Author Posted February 14, 2018 Thank you! I actually was returning SUCCESS every time the item "did something", but apparently only on the server side. -_-; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.