Jump to content

[1.7.2] onUpdate Method Not Being Called for Custom Item


Recommended Posts

Hi! I'm having a bit of an issue, and were it, frankly, a more mundane one, I would have crashlogs to post, however, I do not. The game isn't crashing. onUpdate is simply not working. I thought it may have been the functionality I put into the code, however, even with just

System.out.println("onUpdate is now working!")

the console is not printing anything despite me having the item in my inventory.


This is the item itself: ItemConsumingRage.


This is the class it extends: SAAItemEmpowered.


And this is the class that the class the item extends extends, which in turn extends Item... did that make any sense? SAAItem


A thing to note is that an item that extends SAAItem alone seems to be working just fine. Another thing to note is that the onCreated method for ItemConsumingRage -is- being called, so I have no idea what the heck is going on.


Anyone have any ideas?

Link to comment
Share on other sites



Waste no more time!    Get thee hence to debugging school posthaste!


I guess you're using Eclipse? 





or many many more


Seriously, it's really straightforward to learn and once you've tried it you'll wonder how on earth you ever managed without them.  Step through your code line by line to see where it's going, look at the variables and see what happens to them at each step.  In this case, it will let you find out in 2 minutes flat what happens when the vanilla code gets to your item and tries to call onUpdate for it.





Link to comment
Share on other sites


I've used that type of debugging in VBA and other applications and loved it.  I had 'assumed' incorrectly that with how we were running the testing environment for Eclpise that thye wouldn't work here.


what happens to the server or client when the other hits one of these breaks in the testing envioronment?

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites



Not sure about Eclipse - I use IntelliJ - but when I set a breakpoint on a line in my code or in the vanilla source, it runs to that line and stops exactly like you'd expect.  IntelliJ gives the option of pausing all threads or just the one with the breakpoint, so you can choose what you want it to do (normally I suspend both threads, but doing client or server only also works).



Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.