Jump to content




The Ultimate Guide To Making A Peripheral


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

#1 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 22 October 2013 - 01:47 PM

I've left the old tutorial content here, but you should refer to this document for the updated and clean version of this tutorial. It's completely redone and goes much more in-depth. Be forewarned - it's a full 22 pages and I'm not even quite finished. I have yet to teach how to recompile/reobfuscate, but for now suffice to say that you need to run recompile.bat and then reobfuscate.bat in the MCP directory. Then take the generated folder in mcp/reobf/minecraft/ with your main package name on it and put it in a zip file. That is your mod file and can be loaded as any other mod.

PDF Version

I would appreciate it if you guys would take the time to make a comment on the tutorial if you find any issues/get any errors. It should be open on Google Drive to allow you to do it directly on the document itself, but I'd be fine with a comment here on the forums too. Thanks!

Spoiler
</arguments.length;>

#2 distantcam

  • Members
  • 139 posts
  • LocationChunk 0

Posted 22 October 2013 - 11:00 PM

I just finished going through this tutorial, and I now have myself a working codebase. You sir are a legend!

#3 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 23 October 2013 - 06:07 PM

View Postdistantcam, on 22 October 2013 - 11:00 PM, said:

I just finished going through this tutorial, and I now have myself a working codebase. You sir are a legend!

Thanks! I would suggest reading my new version on Google Drive (see above). I put a ton of work into that thing and IMO it looks pretty nice. Be forewarned though, I'm not even quite done yet and it's hit 22 pages :o

#4 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 23 October 2013 - 06:45 PM

This really overdid my expectations! good job!

I cannot say more then thank you, cant think of anything else at the moment. Oh wait, you will be credited when I have thought of a reasonable peripheral and released! :D

#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 23 October 2013 - 11:18 PM

I skimmed, it all looks good and like a solid tutorial. However, you have a broken spoiler and code tags towards the end, and unless I'm missing it, didn't actually cover how to add Obf'd mods into the Deobf'd development environment. Oh also nice closure tags at the end of the post there :P

#6 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 23 October 2013 - 11:39 PM

View Posttheoriginalbit, on 23 October 2013 - 11:18 PM, said:

I skimmed, it all looks good and like a solid tutorial. However, you have a broken spoiler and code tags towards the end, and unless I'm missing it, didn't actually cover how to add Obf'd mods into the Deobf'd development environment. Oh also nice closure tags at the end of the post there

Heh. You didn't read the note at the top did you :P The forum keeps messing up the post, and I've written a new and hopefully better tutorial on Google Drive. The link is in the OP.

And yeah, adding obfuscated mods to the environment is on my todo list. Unfortunately I've got a number of other things that need attention first.

#7 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 23 October 2013 - 11:44 PM

View PostBubba, on 23 October 2013 - 11:39 PM, said:

Heh. You didn't read the note at the top did you :P The forum keeps messing up the post, and I've written a new and hopefully better tutorial on Google Drive. The link is in the OP.
I read it, just felt like pointing out the broken post :P

View PostBubba, on 23 October 2013 - 11:39 PM, said:

And yeah, adding obfuscated mods to the environment is on my todo list. Unfortunately I've got a number of other things that need attention first.
Fair enough… It is like 2 steps though :P

#8 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 24 October 2013 - 09:58 AM

View Posttheoriginalbit, on 23 October 2013 - 11:44 PM, said:

Fair enough… It is like 2 steps though :P

Indeed.

Quote

Step 1) Refer to this tutorial for how to properly deobfuscate ComputerCraft.
Step 2) Don't be an idiot.


#9 TheOddByte

    Lazy Coder

  • Members
  • 1,607 posts
  • LocationSweden

Posted 24 October 2013 - 02:20 PM

View PostBubba, on 24 October 2013 - 09:58 AM, said:

Quote

Step 1) Refer to this tutorial for how to properly deobfuscate ComputerCraft.
Step 2) Don't be an idiot.
Lol xD
Nice tutorial by the way, I would try to create a peripheral if I ever got the time todo so and an idea of what to make.

#10 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 24 October 2013 - 08:09 PM

View PostBubba, on 24 October 2013 - 09:58 AM, said:

View Posttheoriginalbit, on 23 October 2013 - 11:44 PM, said:

Fair enough… It is like 2 steps though :P

Indeed.

Quote

Step 1) Refer to this tutorial for how to properly deobfuscate ComputerCraft.
Step 2) Don't be an idiot.
More like refer to this reply on that thread. :P

#11 M4sh3dP0t4t03

  • Members
  • 255 posts
  • LocationGermany

Posted 25 October 2013 - 11:13 AM

This is a nice tutorial, but there is no need to make the private World theWorld because any tileentity(and also other entities) already has a object of the world called "worldObj".

Edit: also there is no need to create the EntityCreeper because you can just use null there

#12 The Inspector

  • Members
  • 23 posts

Posted 29 October 2013 - 05:19 AM

I'm not sure what I'm doing wrong but it seems something to do with setting up the IDE, when I import the ComputerCraft API, it doesn't add the "src" folder, it instead skips down a level and adds the "dan200" folder to the package explorer. I then don't have the 2 packages like in the image, but instead just the java files and folders.

I will mention I had to delete my eclipse folder (in the forge > mcp folder) and copy the one out of the forge > fml > eclipse because I screwed up originally and had an outdated version of ComputerCraft which was for MC 1.6.2 and I had tried to use that by accident in eclipse which gave a huge amount of errors and couldn't figure out how to get rid of it.

If I try and continue with the rest of the tutorial, lots of things don't work, or don't pop up. So I think this is clearly the problem.

#13 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 29 October 2013 - 06:51 AM

View PostThe Inspector, on 29 October 2013 - 05:19 AM, said:

I'm not sure what I'm doing wrong but it seems something to do with setting up the IDE, when I import the ComputerCraft API, it doesn't add the "src" folder, it instead skips down a level and adds the "dan200" folder to the package explorer. I then don't have the 2 packages like in the image, but instead just the java files and folders.

I will mention I had to delete my eclipse folder (in the forge > mcp folder) and copy the one out of the forge > fml > eclipse because I screwed up originally and had an outdated version of ComputerCraft which was for MC 1.6.2 and I had tried to use that by accident in eclipse which gave a huge amount of errors and couldn't figure out how to get rid of it.

If I try and continue with the rest of the tutorial, lots of things don't work, or don't pop up. So I think this is clearly the problem.

When you are importing, does the window look like this after selecting the folder?
Posted Image
If not, you're not doing it correctly. You need to select the "src" folder inside of the api, not the api itself.

If you continue to have issues, I would suggest wiping the entire forge directory and starting over. It's possible that the eclipse directory in the forge folder and in the mcp folder are different and that is somehow messing with things.

#14 The Inspector

  • Members
  • 23 posts

Posted 29 October 2013 - 06:59 AM

It didn't have the /src where it says into folder, but I just added it in and its practically the same thing, except for now it says src > dan200 > computer / turtle

I already tried redownloading CC and putting that api in, setting up a new workspace.

I really wanted to avoid redownloading forge since I think it uses a fair bit of internet, that or its really slow and I ain't got much left. If I download MCP from the official website, it has a completely different style of eclipse folder. It has 2 folders in it called Client and Server, as the forge one only had a Minecraft folder in it.

See:
http://i.imgur.com/InFQfaN.jpg

I tried deleting the entire mcp folder and replace it with the one I downloaded from the official website, it worked... for about .2 of a second. I managed to import the cc api and have the apis show up properly for literally .2 of a second I saw them, then they disappeared along with the src folder and 22 errors poped up. sigh.

Alright I found out somewhere that just running the install script again will restore the eclipse folder without having to download everything. So I did that. I loaded it up and tried to import CC, which it did properly this time but now gives me 32 errors.

See:
http://i.imgur.com/rcxj9Tz.jpg

#15 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 29 October 2013 - 07:07 AM

Quote

Use Code Tags!

Good job BBcode...

#16 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 29 October 2013 - 07:27 AM

View PostThe Inspector, on 29 October 2013 - 06:59 AM, said:

It didn't have the /src where it says into folder, but I just added it in and its practically the same thing, except for now it says src > dan200 > computer / turtle

I already tried redownloading CC and putting that api in, setting up a new workspace.

I really wanted to avoid redownloading forge since I think it uses a fair bit of internet, that or its really slow and I ain't got much left. If I download MCP from the official website, it has a completely different style of eclipse folder. It has 2 folders in it called Client and Server, as the forge one only had a Minecraft folder in it.

See:
http://i.imgur.com/InFQfaN.jpg

I tried deleting the entire mcp folder and replace it with the one I downloaded from the official website, it worked... for about .2 of a second. I managed to import the cc api and have the apis show up properly for litterally .2 of a second I saw them, then they disappeared along with the src folder and 22 errors poped up. sigh.

You need to import the src into the 'src' package, not the Minecraft folder. I think that's the problem judging from your picture.

#17 The Inspector

  • Members
  • 23 posts

Posted 29 October 2013 - 07:29 AM

Edited my post.

#18 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 29 October 2013 - 07:30 AM

View PostThe Inspector, on 29 October 2013 - 06:59 AM, said:

-snip-
To make your life easier, and to save polluting the Minecraft project, I suggest not using the MCP Eclipse folder, instead making your own development environment. This is the development environment I use (with a few minor tweaks) Let's Mod with Pahimar! Episode 6: Dev Environment 3.0. It works very well for modding, its initially annoying to get the Minecraft project setup, but once its done once, its done for all, so its nice. Especially when you're wanting to update to a new Minecraft or Forge version!

#19 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 29 October 2013 - 07:56 AM

View PostThe Inspector, on 29 October 2013 - 07:29 AM, said:

Edited my post.

Your environment doesn't look right. It should look like this:
Posted Image

Okay, try going to your eclipse folder in mcp and deleting the .metadata folder. Then extract this folder in its place. However, if you can, it would be best if you could just reinstall forge. I'm not certain as to the amount of bandwidth that it takes, but I would guess it would be no more than 25-30 megabytes.

#20 The Inspector

  • Members
  • 23 posts

Posted 29 October 2013 - 08:34 AM

The forge folder is 200mb for me so thats why I was avoiding downloading it again, I'm burning my mobile internet as it is. I tried adding in the .metadata folder, cause a lot of errors unfortunately. Ill redownload forge tomorrow, hopefully it won't put me over.

Originalbit, haven't ignored you, just haven't got the internet to watch it at the moment.

Thanks for trying anyway Bubba, I also really appreciate that you spent the time to put this guide together as I could only find odd and ends of information.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users