Jump to content




Creating Peripherals and Turtle Upgrades (Updated for 1.5)


65 replies to this topic

#21 cmurtheepic

  • Members
  • 158 posts
  • Locationthe vast cosmos of my mind; binary!

Posted 01 August 2012 - 06:44 PM

the computer should come with casper's (admin) tutorial program

#22 Pharap

  • Members
  • 816 posts
  • LocationEngland

Posted 06 August 2012 - 11:22 PM

Are there any back copies of this for older versions? (I can't get 1.4 working properly)

#23 brucelong

  • Members
  • 33 posts
  • LocationCalifornia, USA

Posted 13 September 2012 - 02:58 PM

How would someone go about coding a peripheral? Is it like coding a mod, or is it more difficult? I'm a newb at this, and I wanted to make a laptop peripheral.
EDIT: Didn't read the ENtire first post... <facepalm>
EDIT#2: How could you implement the screen into a GUI? Like, the os.
EDIT#3: Nevermind, figured it out.

#24 absorr

  • Members
  • 41 posts
  • LocationUnited States

Posted 18 September 2012 - 08:44 PM

Can anyone give me an example on how to use getMethodNames() from IPeripheral because I don't want to mess that up.

#25 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 19 September 2012 - 01:20 AM

return new String[] {"firstMethodName","method2Name","nameOfThirdMethod","nameOfFourthMethod"};

#26 absorr

  • Members
  • 41 posts
  • LocationUnited States

Posted 25 September 2012 - 05:09 PM

View Postimmibis, on 19 September 2012 - 01:20 AM, said:

return new String[] {"firstMethodName","method2Name","nameOfThirdMethod","nameOfFourthMethod"};
so, for one of those method entries I would do something like "myTurtle.doThis" or what?

#27 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 15 October 2012 - 02:52 PM

Could this be updated to 1.43/1.45pre1?

#28 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 16 October 2012 - 10:54 AM

As far as I know and have experienced, the api didn't change for these updates

#29 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 16 October 2012 - 02:11 PM

Ah, thanks!

#30 sirdabalot

  • Members
  • 115 posts

Posted 10 November 2012 - 10:19 AM

Newb question, what does it mean by "add these files to your MCP install"? Meaning which directory should I put the dan200 folder in?

#31 faubiguy

  • Members
  • 213 posts

Posted 10 November 2012 - 10:58 AM

Put the dan200 folder (containing /computer and /turtle directories) in [MCP Directory]/src/common/

#32 sirdabalot

  • Members
  • 115 posts

Posted 10 November 2012 - 11:02 AM

View Postfaubiguy, on 10 November 2012 - 10:58 AM, said:

Put the dan200 folder (containing /computer and /turtle directories) in [MCP Directory]/src/common/

Fankyhoo. :unsure:/>

#33 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 21 November 2012 - 03:26 PM

Can this please be updated? The API changed in 1.45 I think.

#34 FunshineX

  • Members
  • 48 posts
  • LocationSan Jose, CA

Posted 21 November 2012 - 10:37 PM

With 1.45:

java.lang.NoSuchMethodError: net.minecraftforge.common.Configuration.getOrCreateProperty(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/minecraftforge/common/Property;
at dan200.ComputerCraft.setupConfig(ComputerCraft.java:90)

#35 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 21 November 2012 - 11:09 PM

View Postimmibis, on 21 November 2012 - 03:26 PM, said:

Can this please be updated? The API changed in 1.45 I think.

We do plan to release an update - but the API didn't change in 1.4.5 (we didn't even release a new update for 1.4.5).

Edit: derp, our version numbering is getting confusing! The API has only had one small change - and that's removal of the non size sensitive methods in IComputerAccess for mounting folders. Decompile the API for now, or put the binary class files in the lib folder (the only thing you'll miss is the documentation!) - I'll document the stuff added (e.g. not breaking!) and release it soon.

View PostFunshineX, on 21 November 2012 - 10:37 PM, said:

With 1.45:

java.lang.NoSuchMethodError: net.minecraftforge.common.Configuration.getOrCreateProperty(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lnet/minecraftforge/common/Property;
at dan200.ComputerCraft.setupConfig(ComputerCraft.java:90)

That is part of CC itself - and it can't find a forge class. How exactly are you trying to run it?

#36 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 22 November 2012 - 12:28 AM

Well, there was a breaking change in some version past 1.41. Maybe not breaking to mods that use the API, but breaking to mods that bundled it.
Edit: Cloudy told me in IRC it was 1.42.

#37 FunshineX

  • Members
  • 48 posts
  • LocationSan Jose, CA

Posted 01 December 2012 - 02:25 PM

View PostCloudy, on 21 November 2012 - 11:09 PM, said:


That is part of CC itself - and it can't find a forge class. How exactly are you trying to run it?

I don't remember now. But using latest forge and mcp, and this api, I had to change Vec3D to just Vec3 in ITurtleAccess to make it work

#38 bbqroast

  • Members
  • 124 posts

Posted 02 December 2012 - 04:07 PM

Installation tutorial:
1. Setup and install MCP with Forge
2. Download the API at the link provided.
3. Place the "dan200" folder in (MCP folder, with the "jars", "docs" and other folders)/src/common/
4. Open eclipse. Browse to the /Minecraft/common/dan200.turtle.api/ITurtleAccess.java and change "Vec3D" to "Vec3" on line 20 (it should have a red line under it).

Thanks to Funshine for pointing this out.

#39 Wouto1997

  • Members
  • 15 posts

Posted 23 January 2013 - 10:40 AM

At the top of this forum I read that you need a TileEntity which implements an IPeripheral interface, to make an interface... Is this required, or can you also do with a block? since I don't really need TileEntity features.

#40 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 23 January 2013 - 01:39 PM

A tile entity is required. Don't fret though, they aren't scary.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users