1190 posts
Location
RHIT
Posted 11 November 2012 - 06:13 PM
Hello guys,
I was recently reading some
posts in this forum about using BON to run ComputerCraft from Eclipse. As of yet I have not managed to make this work. I've deobfuscated using the BON utility and output that to a jar file called 'ComputerCraft'. I then go into eclipse, open the properties, select the Libraries tab, and add that file as an External Jar. Everything looks fine until I try to run it, which is when I get this error.
Spoiler
2012-11-11 00:09:14 [INFO] [ForgeModLoader] Forge Mod Loader version 4.4.2.440 for Minecraft 1.4.4 loading
2012-11-11 00:09:16 [INFO] [STDOUT] 27 achievements
2012-11-11 00:09:16 [INFO] [STDOUT] 208 recipes
2012-11-11 00:09:16 [INFO] [STDOUT] Setting user: Player332, -
2012-11-11 00:09:16 [INFO] [STDERR] Client asked for parameter: server
2012-11-11 00:09:16 [INFO] [STDOUT] LWJGL Version: 2.4.2
2012-11-11 00:09:17 [INFO] [ForgeModLoader] Attempting early MinecraftForge initialization
2012-11-11 00:09:17 [INFO] [STDOUT] MinecraftForge v6.3.0.363 Initialized
2012-11-11 00:09:17 [INFO] [ForgeModLoader] MinecraftForge v6.3.0.363 Initialized
2012-11-11 00:09:17 [INFO] [ForgeModLoader] Completed early MinecraftForge initialization
2012-11-11 00:09:17 [INFO] [ForgeModLoader] Searching C:\Users\ChallengeAccepted\Minecraft\MCP\eclipse\Copy of Minecraft\mods for mods
2012-11-11 00:09:18 [INFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2012-11-11 00:09:18 [INFO] [STDERR] Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError: dan200/computer/shared/TileEntityDiskDrive
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.Class.getDeclaredMethods0(Native Method)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.Class.getDeclaredMethods(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.gatherAnnotations(FMLModContainer.java:297)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:414)
2012-11-11 00:09:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-11-11 00:09:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
2012-11-11 00:09:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-11-11 00:09:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-11-11 00:09:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:478)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:150)
2012-11-11 00:09:18 [INFO] [STDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
2012-11-11 00:09:18 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:756)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] Caused by: java.lang.ClassNotFoundException: dan200.computer.shared.TileEntityDiskDrive
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:141)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.ClassLoader.loadClass(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.ClassLoader.loadClass(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] … 30 more
2012-11-11 00:09:18 [INFO] [STDERR] Caused by: java.lang.IncompatibleClassChangeError: Implementing class
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.ClassLoader.defineClass1(Native Method)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.ClassLoader.defineClass(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at java.lang.ClassLoader.defineClass(Unknown Source)
2012-11-11 00:09:18 [INFO] [STDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:134)
2012-11-11 00:09:18 [INFO] [STDERR] … 32 more
2012-11-11 00:09:21 [INFO] [STDERR] Someone is closing me!Picture
Spoiler
I can add the peripheral libraries to my project with no issue; it is only when I attempt to deobfuscate ComputerCraft and run it from Eclipse that I run into errors.
Any help would be much appreciated.
19 posts
Posted 11 November 2012 - 09:23 PM
I don't know if this is the best way, but instead of linking the jar in eclipse, try dropping the deobfuscated jar into the mods folder under the jars folder in your work directory where all the scripts are.
mcp-directory/jars/mod/deobfuscated-computer-craft.jar
This method worked for me better than linking it in eclipse
Remeber that you still need to make sure that you set the width and height fields in the GuiOptions class to public.
Edit: GuiButton class. Sorry.
2447 posts
Posted 11 November 2012 - 10:34 PM
Also try removing the API from the workspace. It's probably conflicting with the API inside CC.
1190 posts
Location
RHIT
Posted 12 November 2012 - 05:19 AM
Thanks for replying guys. Unfortunately I'm still running into issues. The width and height fields do not seem to be declared in the GuiOptions class - they're declared in the GuiScreen class. Maybe I'm just too noobish at java to understand what you're asking me to do, or maybe I have a newer version of MCP/Minecraft. The width and height fields are already set to public in the GuiScreen class.
EDIT: I went back and looked at immibis' original post and saw that he said you need to edit the GuiButton class. I don't know if this is what you meant, but either way it still did not work.
I don't know if this is the best way, but instead of linking the jar in eclipse, try dropping the deobfuscated jar into the mods folder under the jars folder in your work directory where all the scripts are.
mcp-directory/jars/mod/deobfuscated-computer-craft.jar
This method worked for me better than linking it in eclipse
By this do you mean I should put it under:
MCP-dir/eclipse/Minecraft/mods/deobfuscated-computer-craft.jar?
Putting it into the regular mcp/jars/mod/ directory had no effect.
1054 posts
Posted 12 November 2012 - 06:04 AM
I always put the deobfuscated jar file in 'mcp/lib/', nothing in 'mcp/jar/mods'. And then I reference to it as library from eclipse and change the width and height fields in GuiButton to public as stated before.. Maybe you could try that?
1190 posts
Location
RHIT
Posted 12 November 2012 - 06:35 AM
I always put the deobfuscated jar file in 'mcp/lib/', nothing in 'mcp/jar/mods'. And then I reference to it as library from eclipse and change the width and height fields in GuiButton to public as stated before.. Maybe you could try that?
Still getting the same error log. Do I need to decompile it again after I put the deobfuscated file into mcp/lib?
1190 posts
Location
RHIT
Posted 12 November 2012 - 07:36 AM
19 posts
Posted 12 November 2012 - 08:57 AM
2012-11-11 00:09:14 [INFO] [ForgeModLoader] Forge Mod Loaderversion 4.4.2.440 for Minecraft 1.4.4 loading
Your running a incompatible version of minecraft for computer craft 1.4.6, as computer craft 1.4.6 is released for minecraft 1.4.2. When you deobfuscated it, it deobfuscated wrong because the mappings are different in 1.4.4 than in 1.4.2 and MCP for 1.4.4 isn't released yet.
Try setting up a workspace for minecraft 1.4.2 instead of 1.4.4, and that should fix the problem you are having.
1190 posts
Location
RHIT
Posted 12 November 2012 - 09:05 AM
I don't know why the error log says Minecraft 1.4.4, but I am using Minecraft 1.4.2. Maybe that is a bug with forge or MCP? 1.4.4 is still in pre-release stages (which I have not tried), and I got this jar freshly download from my .minecraft/bin file.
EDIT: Unless the Forge installation is for minecraft 1.4.4 and it automatically downloaded Minecraft 1.4.4… Let me try to download an older version of Forge and see if that works.
EDIT2: Okay, the forge version I was using was version .363. The current stable version is version .341. I'm decompiling with Version .341 right now, so I'll see how that works.
1190 posts
Location
RHIT
Posted 12 November 2012 - 09:24 AM
Nope. Still get the same error message (with the exception of it saying Minecraft 1.4.2 now). Here is the error log again.
Spoiler
2012-11-11 15:32:22 [INFO] [ForgeModLoader] Forge Mod Loader version 4.2.6.422 for Minecraft 1.4.2 loading
2012-11-11 15:32:23 [INFO] [STDOUT] 27 achievements
2012-11-11 15:32:23 [INFO] [STDOUT] 208 recipes
2012-11-11 15:32:23 [INFO] [STDOUT] Setting user: Player734, -
2012-11-11 15:32:23 [INFO] [STDERR] Client asked for parameter: server
2012-11-11 15:32:23 [INFO] [STDOUT] LWJGL Version: 2.4.2
2012-11-11 15:32:24 [INFO] [ForgeModLoader] Attempting early MinecraftForge initialization
2012-11-11 15:32:24 [INFO] [STDOUT] MinecraftForge v6.0.1.341 Initialized
2012-11-11 15:32:24 [INFO] [ForgeModLoader] MinecraftForge v6.0.1.341 Initialized
2012-11-11 15:32:24 [INFO] [ForgeModLoader] Completed early MinecraftForge initialization
2012-11-11 15:32:24 [INFO] [ForgeModLoader] Searching C:UsersMichaelMinecraftMCPNeweclipseCopy of Minecraftmods for mods
2012-11-11 15:32:25 [INFO] [ForgeModLoader] Forge Mod Loader has identified 5 mods to load
2012-11-11 15:32:25 [INFO] [STDERR] Exception in thread "Minecraft main thread" java.lang.NoClassDefFoundError: dan200/computer/shared/TileEntityDiskDrive
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.Class.getDeclaredMethods0(Native Method)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.Class.getDeclaredMethods(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.gatherAnnotations(FMLModContainer.java:297)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:414)
2012-11-11 15:32:25 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-11-11 15:32:25 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:140)
2012-11-11 15:32:25 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-11-11 15:32:25 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-11-11 15:32:25 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:83)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:478)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:150)
2012-11-11 15:32:25 [INFO] [STDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:420)
2012-11-11 15:32:25 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:752)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] Caused by: java.lang.ClassNotFoundException: dan200.computer.shared.TileEntityDiskDrive
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:126)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.ClassLoader.loadClass(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.ClassLoader.loadClass(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] … 30 more
2012-11-11 15:32:25 [INFO] [STDERR] Caused by: java.lang.IncompatibleClassChangeError: Implementing class
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.ClassLoader.defineClass1(Native Method)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.ClassLoader.defineClass(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at java.lang.ClassLoader.defineClass(Unknown Source)
2012-11-11 15:32:25 [INFO] [STDERR] at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:120)
2012-11-11 15:32:25 [INFO] [STDERR] … 32 more
2012-11-11 15:32:26 [INFO] [STDERR] Someone is closing me!
2447 posts
Posted 12 November 2012 - 09:49 AM
Remove the API source.
1190 posts
Location
RHIT
Posted 12 November 2012 - 09:55 AM
I didn't put the API into eclipse at all. Unless you mean remove it from the reobfuscated jar file, in which case how would I do that?
1190 posts
Location
RHIT
Posted 12 November 2012 - 10:02 AM
Finally figured it out! I forgot to run BON again after downgrading to forge version 341. Everything is working now. Thank you guys so much for your patience :unsure:/>/>
In case anyone would like to do this again and have trouble following all that went on here, here is a step-by-step tutorial:
1) Download MCP for the current ComputerCraft supported version of Minecraft
2) Download Forge Source for the current ComputerCraft supported version of MCP
3) Download Bearded Octo Nemesis
4) Install Forge into your MCP folder
5) Run BON on the ComputerCraft mod. Drag the resulting file into your MCP/lib/ folder.
6) Open eclipse and set the workspace to your MCP/eclipse/ folder.
7) Add the deobfuscated ComputerCraft jar/zip file to the referenced libraries.
8) Change the width and height variables to public in net.minecraft.src.GuiButton
9) Enjoy ^_^/>/>
115 posts
Posted 12 November 2012 - 10:22 AM
In case anyone would like to do this again and have trouble following all that went on here, here is a step-by-step tutorial:
That should be in a pinned topic to help simpletons like me.
3 posts
Posted 23 January 2013 - 11:33 PM
If you can't craft your peripherals, change the @Mod line in your main file mod like this:
@Mod(modid = "yourmod", name = "yourmodname", version = "1.0",dependencies = "required-after:CCTurtle")
I was 2 days looking for ways to craft my peripherals :)/>
Edited on 24 January 2013 - 12:27 AM
8543 posts
Posted 24 January 2013 - 04:26 AM
I don't see how that is relevant to the rest of the two-month-old topic. Locked.