Creating Peripherals and Turtle Upgrades (...
Zinal 02 Feb 2013
Is there any way to download the 1.46 API version? I'm trying to make a turtle upgrade for an FTB Server but FTB (Beta Pack A) is using version 1.46 of ComputerCraft, not 1.48.
Oh, as a side-note (Might have to do with the version change): ITurtleUpgrade.createPeripheral is giving me an AbstractError, which i found very wierd
Oh, as a side-note (Might have to do with the version change): ITurtleUpgrade.createPeripheral is giving me an AbstractError, which i found very wierd
ee_man 30 Mar 2013
I don't have permission to edit this list (http://www.computerc...tle_Upgrade_IDs)
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
Cloudy 30 Mar 2013
Then request permission on the forum thread... check the wiki discussion forum.
Shnupbups 30 Mar 2013
ee_man, on 30 March 2013 - 08:34 AM, said:
I don't have permission to edit this list (http://www.computerc...tle_Upgrade_IDs)
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
ee_man 08 Apr 2013
Shnupbups100, on 30 March 2013 - 11:16 AM, said:
ee_man, on 30 March 2013 - 08:34 AM, said:
I don't have permission to edit this list (http://www.computerc...tle_Upgrade_IDs)
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
Khalory 10 Apr 2013
This seems pretty stupid since I've already managed to get the API ready to use but... Where is the documentation? I can't find it inside the download so am I just blind or is it somewhere else?
Cloudy 10 Apr 2013
Khalory 10 Apr 2013
Cloudy, on 10 April 2013 - 07:30 AM, said:
It is javadoc comments in the API source.
The API I have doesn't have them so maybe I wasn't supposed to do what I did? I opened up the main ComputerCraft download and decompiled and deobfuscated the API that was inside but there are no javadocs in what I have. Is there a separate, already deobfuscated source elsewhere that has the javadocs?
Espen 10 Apr 2013
Khalory, on 10 April 2013 - 08:02 AM, said:
The API I have doesn't have them so maybe I wasn't supposed to do what I did? I opened up the main ComputerCraft download and decompiled and deobfuscated the API that was inside but there are no javadocs in what I have. Is there a separate, already deobfuscated source elsewhere that has the javadocs?
Copy the contents from that folder into your Mod's project.
However when you're packing up your mod for release, you needn't and shouldn't include the API!
Edited by Espen, 10 April 2013 - 08:29 AM.
Khalory 10 Apr 2013
Espen, on 10 April 2013 - 08:26 AM, said:
The API source files (including comments) are within the ComputerCraft zip file under "api\src".
Copy the contents from that folder into your Mod's project.
However when you're packing up your mod for release, you needn't and shouldn't include the API!
Copy the contents from that folder into your Mod's project.
However when you're packing up your mod for release, you needn't and shouldn't include the API!
Thanks to your help I found out that I was just using a version of the download that was before the api\src folder was added to the .zip file. I can definitely find the newest version of the API, thanks.
Xfel 02 Jul 2013
JustPingo 02 Sep 2013
Hi !
When I put the API, there's no computer when I launch the game with eclipse, and if I put CC in jars' mods folder, it crash.
What should I do please ?
Thanks in advance.
When I put the API, there's no computer when I launch the game with eclipse, and if I put CC in jars' mods folder, it crash.
What should I do please ?
Thanks in advance.
GammaPaladin 25 Sep 2013
Sooooooo... I'm working on a peripheral for my own convenience, mostly, and I'm having a slight problem. I'm returning an Object[] with 3 Integers in the array, but for some reason, when I call the function, I only get the first Integer's value.
This is my callMethod block. It only has one method for now, but I plan to add a few later, hence the switch.
That's working, because getPos() is called. Here is the getPos function:
I know the array initialization is ugly, I was just trying to do it in the most basic way possible to ferret out any possible problems. The log statement works, I get the correct xyz coordinates displayed in the log:
But if I try:
I just get 1106.
I'm sure I've missed something obvious, so I figured I'd see if anyone can spot whatever it is I've missed.
This is my callMethod block. It only has one method for now, but I plan to add a few later, hence the switch.
@Override public Object[] callMethod(IComputerAccess computer, int method, Object[] arguments) throws Exception { if (computer == data.controller) { switch (method) { case 0: return getPos(); } } return null; }
That's working, because getPos() is called. Here is the getPos function:
private Integer[] getPos() { Integer x = new Integer(xCoord); Integer y = new Integer(yCoord); Integer z = new Integer(zCoord); OverNet.log(Level.INFO, "Coordinates: (" + x.toString() + ", " + y.toString() + ", " + z.toString() + ")"); Integer[] pos = new Integer[3]; pos[0] = x; pos[1] = y; pos[2] = z; return pos; }
I know the array initialization is ugly, I was just trying to do it in the most basic way possible to ferret out any possible problems. The log statement works, I get the correct xyz coordinates displayed in the log:
2013-09-25 17:31:48 [INFO] [OverNet] Coordinates: (1106, 4, 1534)
But if I try:
local gps = peripheral.wrap("right") print(textutils.serialize(gps.locate()))
I just get 1106.
I'm sure I've missed something obvious, so I figured I'd see if anyone can spot whatever it is I've missed.
tikiking1 29 Sep 2013
Is there any way to make a custom computer? I'm thinking of making a PDA-style item, and none of the classes in the Javadoc seem like they'd help. Would I have to decompile the "actual" mod and use whichever class makes the GUI?
sockeye 06 Nov 2013
I created a peripheral. Please add Turtle ID 70 as Crop Manager turtle and give me permission to create a post about my mod here. My mod is here.
M4sh3dP0t4t03 20 Dec 2013
GammaPaladin, on 25 September 2013 - 07:46 PM, said:
Snip snip
--Lua side fix local gps = peripheral.wrap("right") local x, y, z = gps.locate()Or Java side:
@Override public Object[] callMethod(IComputerAccess computer, int method, Object[] arguments) throws Exception { if (computer == data.controller) { switch (method) { case 0: return new Object[] {getPos()}; } } return null; }
_CR_ 15 Apr 2014
Hi, I just registered 'cause I've recently developed a mod that adds a turtle chunkloader and I wanted to post it here. I've seen I can't start a new topic, can you please give me the rights to do so?
I also wanted to ask before releasing the mod: I have to follow some logic in choosing the turtle upgrade ID other then looking on the wiki if it's already used? thanks
I also wanted to ask before releasing the mod: I have to follow some logic in choosing the turtle upgrade ID other then looking on the wiki if it's already used? thanks
Cranium 15 Apr 2014
You actually should be able to create a topic as a New Member.
Take a look at the forum guidelines in the announcements, and it explains the restrictions on new members.
Take a look at the forum guidelines in the announcements, and it explains the restrictions on new members.
Lyqyd 15 Apr 2014
The Peripherals section may not have the topic creation permissions for new members because it's a relatively rare situation, so I probably didn't think of it when changing around the new members restrictions last time. I'll adjust them later this evening.
As for the upgrade ID, be sure to reserve your number in the wiki when you publish the mod. If you don't already have edit permissions, you could post in the sticky post in the wiki discussion section.
As for the upgrade ID, be sure to reserve your number in the wiki when you publish the mod. If you don't already have edit permissions, you could post in the sticky post in the wiki discussion section.