510 posts
Posted 05 November 2012 - 12:48 AM
When writing a small peripheral mod, I'd like my peripherals to appear on the same creative tab as all other cc items. So, I would like to see a method like ComputerCraftAPI.getCreativeTab, as I currently have to use reflection…
514 posts
Location
Over there
Posted 05 November 2012 - 01:08 AM
I think this would be really good, as some peripheral authors started making their own tabs, which would spam the creative menu.
1054 posts
Posted 05 November 2012 - 03:28 AM
Why do you need reflection? The getCreativeTab() method (or is it just a data member, don't remember) is declared public in ComputerCraft.class . I just had to compile it against ComputerCraft as a library. Nevertheless, it would be good that this would b accessible in the API. That's what the API is made for, right? Easy access to helpful methods. :D/>/>
2447 posts
Posted 05 November 2012 - 10:59 AM
I plan to expose this when I add a new API soon. Although you can probably access it through the CreativeTabs object right now by checking against the name.
1054 posts
Posted 06 November 2012 - 02:43 PM
I checked again, and if you don't mind linking against ComputerCraft as a library, you can access it as 'ComputerCraft.ccTab' . Of course, if you could do it Cloudy's way, it keeps your mod version compatible.
510 posts
Posted 06 November 2012 - 07:44 PM
I'm using Orwells solution now, as I have a deobfuscated version of ComputerCraft for debugging anyway.