Posted June 24, 201411 yr 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?
June 25, 201411 yr Hi I suggest you put a breakpoint into InventoryPlayer.decrementAnimations() and see directly why your item isn't getting called. -TGG
June 25, 201411 yr Author Eep. I haven't yet looked into breakpoints and have no idea how to use them.
June 26, 201411 yr Dude! Waste no more time! Get thee hence to debugging school posthaste! I guess you're using Eclipse? http://www.vogella.com/tutorials/EclipseDebugging/article.html or http://agile.csc.ncsu.edu/SEMaterials/tutorials/eclipse-debugger/ 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. -TGG
June 26, 201411 yr Grey, 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
June 30, 201411 yr @Delpi 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). -TGG
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.