Jump to content

Recommended Posts

Posted

I am creating a ComputerCraft peripheral mod and I need to test it. I have added computercraft.jar to my referenced libraries, but now it throws an error every time I try to run MC. I have tried deobfuscating ComputerCraft and it still does not work.

 

  Reveal hidden contents

 

 

Please Help!

Posted

Do not deobfuscate ComputerCraft, because it do provides API. Download ComputerCraft (I'll call it "CC" next, OK?) 1.63

1. Assuming you already have your workspace set up, create a new folder named "/lib" in your project directory. That's the directory that contains your /bin, /build, /gradle, and /src folders, and now also has a /lib folder.

 

2. Place ComputerCraft1.63.jar into "/lib" you just created.

 

3. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then "Add External JARs" and find the binary CC file that you just placed in the /lib folder.

 

To add JavaDoc and API source code:

1. Open ComputerCraft1.63.jar with any 7zip or any other archivator, go to "api", there will be 2 folders: "doc" and "src". The first contains JavaDoc, the second source. Copy these folders to any folder.

2. Create 2 files called "ComputerCraft1.63JavaDoc.zip/jar" and "ComputerCraft1.63APISRC.zip/jar". Into the first file extract "doc" folder, then, open "src" folder, there you'll see "dan200" folder", add it into "ComputerCraft1.63APISRC.zip/jar".

 

3.Move "ComputerCraft1.63JavaDoc.zip/jar" and "ComputerCraft1.63APISRC.zip/jar" into /lib folder.

 

4. Open the "Referenced Libraries" tree in your package explorer, find "ComputerCraft1.63.jar" and right-click on it; go to "Properties" -> "External location" -> "External file" and navigate to wherever you stored the source file (ComputerCraft1.63APISRC.zip/jar), preferably right next to the binary in the /lib folder.

 

5. In Eclipse, right-click on your project, select "Build Path" and then "Configure Build Path". Click the "Libraries" tab, then find ComputerCraft1.63.zip/jar, select "JavaDoc Location" and click "edit" and find the JavaDoc CC file that you just placed in the /lib folder.

 

6. Run your debug configuration and see if everything is still working; if so, great! If not, you may need to run setupDev and setupDecomp workspace one more time:

 

a. gradlew setupDevWorkspace

b. gradlew setupDecompWorkspace

c. gradlew eclipse // will vary depending on your IDE

 

Once you have the debug client working, you should see that both your mod and CC are loaded; if you start a new game, anything added by CC will be in that game as well and should be fully functional.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.