Posted January 3, 201411 yr Hello, I am working on an item and I need to do something only once while the right click is pressed. I looked at some vanilla items and some of them were calling OnItemStoppedUsing, I looked at some forge tutorials, the rifle tutorial is using the same function. When I use it in my mod it never gets called, do I need to extend something special for it to work?
January 3, 201411 yr Author I wasn't setting the item as used, but, is there a way to not slow the player down?
January 3, 201411 yr I'd recommend looking at the code in the Item class for that method, it should have the code for making the player slow down, use an at override method on the one in your class and remove that line of code slowing the player down. Should suffice for your purposes.
January 3, 201411 yr Author I found the method but, overriding it, that never came into my mind, thank you for the idea:) Why it was slowing down the player it was because it was making the player have the same things as when eating, holding a sword, drinking potions.
January 3, 201411 yr Glad I could help. I am not the best with Java so whenever I get the chance to help I jump at it.
January 3, 201411 yr Author It was a good idea until I realized that the method that I need is in the player class
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.