Jump to content




Learning by example


  • You cannot reply to this topic
10 replies to this topic

#1 kazagistar

  • Members
  • 365 posts

Posted 05 June 2012 - 12:41 AM

I really want to start building some CC peripherals, and I have strong background in Java, but I have not made any minecraft mods before. Instead of trying to learn the minecraft API from the ground up, is there any existing peripheral mod whose source I could look at, so I could just learn by example?

#2 Xfel

    Peripheral Designer

  • Members
  • 515 posts

Posted 05 June 2012 - 06:30 AM

hmm, I'm thinking about releasing the source of the ARP mod, but there is a little problem with the licenses...

#3 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 08 June 2012 - 09:42 PM

Well I can serve the SC for the CCPDA Peripheral. I know it's not good at all. But it was the first thing I'd ever made in Java. But It might help you.

http://www.mediafire...4hrbajn8vj9713b

If you have any questions ask.

#4 kazagistar

  • Members
  • 365 posts

Posted 09 June 2012 - 05:11 AM

This is exactly what I was looking for, thanks! I'll see if I can't start pulling out some peripheral modding this weekend.

#5 Megolas

  • New Members
  • 8 posts

Posted 09 June 2012 - 10:53 AM

Actually, its the first time im making a non-bukkit mod, and i wondered, am i supposed to place these files in the minecraft source of mcp? What packages do i import? Thanks!

#6 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 09 June 2012 - 01:17 PM

Once you've decompiled your minecraft.jar with Modloader via MCForge. You place the java files into mcpsrcminecraftnetminecraftsrc
Make sure you also put the ComputerCraft peripheral API in the right spot.
When debugging you'll always have to re obfuscate and then put the files into a folder which you place in your .minecraft/mods folder

#7 Megolas

  • New Members
  • 8 posts

Posted 09 June 2012 - 02:56 PM

so cant i edit it with eclipse as a project? I need all of the other files too?

#8 Megolas

  • New Members
  • 8 posts

Posted 09 June 2012 - 03:22 PM

and how do i add the computer API?

#9 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 09 June 2012 - 05:35 PM

Quote

The download includes the source files for the two interfaces you need to interact with to make peripherals, and includes complete, thorough javadoc documentation. To make a mod, add these files to your MCP install, and implement IPeripheral on your TileEntity. You do not need to and should not distribute the class files for these files with your mod.

If all goes well, then when you re-obfuscate your mod and install alongside ComputerCraft, and place your block alongside a computer, and the computer will be able to access it via the "peripheral" API in Lua.


Feel free to post any questions about the API you have in this thread, but please read the documenation first, and be aware that this API is designed for users who already know how to produce mods for Minecraft, so we won't help you with basic mod setup.


#10 Megolas

  • New Members
  • 8 posts

Posted 09 June 2012 - 06:46 PM

I tried, i placed the file in there and it didnt import it :

#11 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 09 June 2012 - 06:53 PM

add the dan200 folder included with the API into the libs folder of MCP - then add to your buildpath in MCP. Should work.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users