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...
API Request: Creative tab access
Started by Xfel, Nov 05 2012 12:48 AM
5 replies to this topic
#1
Posted 05 November 2012 - 12:48 AM
#2
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.
#3
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.
/>
#4
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.
#5
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.
#6
Posted 06 November 2012 - 07:44 PM
I'm using Orwells solution now, as I have a deobfuscated version of ComputerCraft for debugging anyway.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











