Jump to content




(Solved)Computercraft API not registering turtle upgrades


2 replies to this topic

#1 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 18 March 2016 - 04:26 PM

I am trying to create a turtle upgrade, but it doesn't work:
Here are the neccessary files:
http://pastebin.com/N0jZ8xRE - the class that is registering the turtle upgrades, yes it is called, I debugged it (crashes at line 21 because of debugging, NullPointerException), because the turtle upgrade is not registered (without line 21 of course it runs but when I try to craft upgraded turtle/equip item it does nothing/ says item is not equippable)
http://pastebin.com/QRKEHNhM - the ITurtleUpgrade, the debug at line 28 is successfully output to the console.

Edit: solved, it seems that the integer id was not enough, a resourcelocation id was neccessary too

Edited by Konlab, 23 March 2016 - 02:06 PM.


#2 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 20 March 2016 - 12:28 PM

I'm not that familiar with the API anymore, but posting the error stacktrace always is must-do with errors, simply because it is not clear what the exact issue is. A nullpointer could be anywhere :P/>

Edited by Engineer, 20 March 2016 - 12:36 PM.


#3 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 20 March 2016 - 01:03 PM

Sorry for not being clear.
The exception is not happenning normally, only when I try to access my turtle uprade from dan200.computercraft.ComputerCraft, and it is because the getturtleupgradebyid returns null when it should return my upgrade.

Edit: http://pastebin.com/QzdP3xWT - is the stacktrace if it does help

Edited by Konlab, 20 March 2016 - 01:16 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users