Jump to content




Peripheral Api Issue - Turtle Upgrade Id 32767 Fails Silently?


  • You cannot reply to this topic
3 replies to this topic

#1 GopherAtl

  • Members
  • 888 posts

Posted 06 August 2013 - 12:02 PM

Working on a new mod, while testing I had my turtle upgrade class returning 32767 for getUpgradeID(), and the turtle was not craftable.

Changed it to 32766, and now it works fine.

When returning 32767, registerTurtleUpgrade didn't throw an exception (which the documentation says it would, if it's in use or reserved), or show any error message in the logs, but it isn't craftable in-game, either.

Pretty minor thing, but figured I'd report it anyway. I figured out that was the problem pretty quickly, but others might not be so lucky and do much head-scratching over why it isn't working!

#2 exploder

  • Members
  • 69 posts
  • LocationLatvia

Posted 09 August 2013 - 04:08 AM

Well I guess the problem could be because 32767 is the max size of short data type in Java? If you look at this side then you'll see that short min and max values are exactly -32767 and 32767 (assuming that CC uses short data type for IDs). But I might not be 100% sure.

Site: http://www.tutorials...c_datatypes.htm

#3 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 11 August 2013 - 07:38 AM

Why would that be it? The maximum is 32767, so 32767 is still a valid value.

The minimum value is -32768, btw.

#4 exploder

  • Members
  • 69 posts
  • LocationLatvia

Posted 11 August 2013 - 12:31 PM

View Postimmibis, on 11 August 2013 - 07:38 AM, said:

Why would that be it? The maximum is 32767, so 32767 is still a valid value.

The minimum value is -32768, btw.

I though about that too but as I said in last post is that i'm not 100% sure.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users