This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
EveryOS's profile picture

import cc packages

Started by EveryOS, 25 May 2016 - 05:40 PM
EveryOS #1
Posted 25 May 2016 - 07:40 PM
I am using eclipse and would like to access cc api. How would I do it, would a just convert the jar file into a zip file and extract that, or is there a CC 'opensource' ?
Creator #2
Posted 25 May 2016 - 07:51 PM
CC is closed source. I'm not sure how mods work, but I suppose it goes through forge.
SquidDev #3
Posted 25 May 2016 - 09:03 PM
If you open the ComputerCraft jar file as a zip, there is a folder called api/src. You can copy the contents of that to src/api/java and it should just work fine (see OpenPeripherals for an example).
Edited on 25 May 2016 - 07:03 PM
Lyqyd #4
Posted 25 May 2016 - 10:05 PM
Moved to Peripheral Help and Discussion.

You can also just add the CC jar as a reference library. This options means you won't end up packaging the CC API with your mod unnecessarily.
EveryOS #5
Posted 26 May 2016 - 12:25 PM
Moved to Peripheral Help and Discussion.
Never said the mod would add peripherals
If you open the ComputerCraft jar file as a zip, there is a folder called api/src. You can copy the contents of that to src/api/java and it should just work fine (see OpenPeripherals for an example).
Thx!!!
EveryOS #6
Posted 26 May 2016 - 07:16 PM
Okay, and what if I want to edit the src afterwards:

This API may be redistributed unmodified and in full only
Bomb Bloke #7
Posted 27 May 2016 - 01:34 AM
Then you can't redistribute it. Simple.