Creating Peripherals and Turtle Upgrades (Updated for 1.5)
#41
Posted 02 February 2013 - 10:07 PM
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
#42
Posted 30 March 2013 - 08:34 AM
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
#43
Posted 30 March 2013 - 11:02 AM
#44
Posted 30 March 2013 - 11:16 AM
ee_man, on 30 March 2013 - 08:34 AM, said:
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
#45
Posted 08 April 2013 - 04:10 AM
Shnupbups100, on 30 March 2013 - 11:16 AM, said:
ee_man, on 30 March 2013 - 08:34 AM, said:
My mod (http://www.minecraft.../topic/1715756-) use 245 and 246 ids
#46
Posted 10 April 2013 - 05:33 AM
#47
Posted 10 April 2013 - 07:30 AM
Khalory, on 10 April 2013 - 05:33 AM, said:
It is javadoc comments in the API source.
#48
Posted 10 April 2013 - 08:02 AM
Cloudy, on 10 April 2013 - 07:30 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?
#49
Posted 10 April 2013 - 08:26 AM
Khalory, on 10 April 2013 - 08:02 AM, said:
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.
#50
Posted 10 April 2013 - 08:43 AM
Espen, on 10 April 2013 - 08:26 AM, said:
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.
#51
Posted 27 June 2013 - 07:10 PM
#53
Posted 02 September 2013 - 04:38 AM
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.
#54
Posted 25 September 2013 - 07:46 PM
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.
#55
Posted 29 September 2013 - 06:33 PM
#57
Posted 20 December 2013 - 05:53 PM
GammaPaladin, on 25 September 2013 - 07:46 PM, said:
--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; }
#58
Posted 15 April 2014 - 08:40 PM
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
#59
Posted 15 April 2014 - 08:52 PM
Take a look at the forum guidelines in the announcements, and it explains the restrictions on new members.
#60
Posted 15 April 2014 - 09:13 PM
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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users