1243 posts
Location
Indiana, United States
Posted 16 July 2013 - 10:26 AM
I recommend theoriginalbit's method:
http://www.computercraft.info/forums2/index.php?/topic/14131-how-to-properly-deobfuscate-computercraft-for-use-in-eclipse-155-only/page__view__findpost__p__149411Old method:
Spoiler
If you know how to deobfuscate and just need Computercraft-specific instructions, skip to step 6.- First, of course, you want to download the latest Computercraft.
- Then download Bearded Octo Nemesis (BON), a tool developed by immibis to aid in deobfuscation. (https://github.com/i...ed-octo-nemesis)
- Create a directory called "deobf" anywhere (not in MCP), and copy the Computercraft zip to it.
- Run BON with the command line/terminal; "java -jar BON.jar". (Note that Linux users without desktop environments are on their own.)
- Select the copied Computercraft zip as input, then copy the input line to the output line, but modify the output line's file location to read "ComputerCraft${VERSION}-deobf.zip. Select your MCP folder as the MCP folder (You must run reobfuscate.sh/bat before running BON). Start the deobfuscation.
- Now, in your IDE, modify net.minecraft.client.gui.GuiButton.width/height to public instead of protected.
- Finally, copy the assets folder from the original Computercraft zip to the deobfuscated one.
Now you can put the deobfuscated Computercraft zip in ${mcp-location}/jars/mods/ to run it when testing.
If anything doesn't work, please post below!
THIS METHOD ONLY WORKS FOR CC 1.55+!
Edited on 09 January 2014 - 11:40 AM
730 posts
Location
London, UK
Posted 16 July 2013 - 11:02 AM
If you know how to deobfuscate and just need Computercraft-specific instructions, skip to step 6.
- First, of course, you want to download the latest Computercraft.
- Then download Bearded Octo Nemesis (BON), a tool developed by immibis to aid in deobfuscation. (https://github.com/i...ed-octo-nemesis)
- Create a directory called "deobf" anywhere (not in MCP), and copy the Computercraft zip to it.
- Run BON with the command line/terminal; "java -jar BON.jar". (Note that Linux users without desktop environments are on their own.)
- Select the copied Computercraft zip as input, then copy the input line to the output line, but modify the output line's file location to read "ComputerCraft${VERSION}-deobf.zip. Select your MCP folder as the MCP folder (You must run reobfuscate.sh/bat before running BON). Start the deobfuscation.
- Now, in your IDE, modify net.minecraft.client.gui.GuiButton.width/height to public instead of protected.
- Finally, copy the assets folder from the original Computercraft zip to the deobfuscated one.
Now you can put the deobfuscated Computercraft zip in ${mcp-location}/jars/mods/ to run it when testing.
If anything doesn't work, please post below!
You can just click on bon.jar…
in windows, at least!
1243 posts
Location
Indiana, United States
Posted 16 July 2013 - 01:02 PM
Yes, but I'm just making sure that Linux people can do this too.
997 posts
Location
Wellington, New Zealand
Posted 16 July 2013 - 05:25 PM
Is the GuiButton.width thing happening again?
1243 posts
Location
Indiana, United States
Posted 16 July 2013 - 06:05 PM
Indeed it is.
23 posts
Posted 04 August 2013 - 04:12 PM
Never mind, got it to work.
6 posts
Posted 05 August 2013 - 10:48 PM
I followed all the instructions to the T and everything seemed to go smoothly but when I load the client there is no computercraft. Am I missing an obvious step not mentioned?
EDIT: I figured out how to get it to load but still fail to see it's classes in eclipse.
Edited on 05 August 2013 - 09:33 PM
1243 posts
Location
Indiana, United States
Posted 05 August 2013 - 11:44 PM
For anyone reading this later, I suspect his problem was not putting Computercraft*.zip in the <mcpdir>/jars/mods/ folder.
That said,
You're not supposed to see the classes in Eclipse. Computercraft is definitely not open source and I do not know how nor would I tell how to view the source code. (That's not some BS disclaimer; I seriously don't know and wouldn't tell if I did.)
718 posts
Location
Hawaii
Posted 07 August 2013 - 02:23 AM
Whenever I load or create a new world, It gives me this error:
Spoiler
2013-08-06 20:24:02 [SEVERE] [Minecraft-Client] Realms: Invalid session id
2013-08-06 20:24:14 [INFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.2
2013-08-06 20:24:14 [INFO] [Minecraft-Server] Generating keypair
2013-08-06 20:24:15 [INFO] [ForgeModLoader] Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1ce384af)
2013-08-06 20:24:15 [INFO] [ForgeModLoader] Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1ce384af)
2013-08-06 20:24:15 [INFO] [STDERR] java.lang.NullPointerException
2013-08-06 20:24:15 [INFO] [STDERR] at dan200.computer.core.JarMount$FileInZip.getParent(JarMount.java:102)
2013-08-06 20:24:15 [INFO] [STDERR] at dan200.computer.core.JarMount.<init>(JarMount.java:164)
2013-08-06 20:24:15 [INFO] [STDERR] at dan200.ComputerCraft.createResourceMount(ComputerCraft.java:415)
2013-08-06 20:24:15 [INFO] [STDERR] at dan200.computer.shared.ItemTreasureDisk.getTreasureMount(ItemTreasureDisk.java:227)
2013-08-06 20:24:15 [INFO] [STDERR] at dan200.computer.shared.ItemTreasureDisk.registerDungeonLoot(ItemTreasureDisk.java:159)
2013-08-06 20:24:15 [INFO] [STDERR] at dan200.computer.shared.ComputerCraftProxyCommon$ForgeHandlers.onWorldLoad(ComputerCraftProxyCommon.java:578)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraftforge.event.ASMEventHandler_5_ForgeHandlers_onWorldLoad_Load.invoke(.dynamic)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:39)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraftforge.event.EventBus.post(EventBus.java:108)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:85)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)
2013-08-06 20:24:15 [INFO] [STDERR] at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2013-08-06 20:24:15 [SEVERE] [Minecraft-Server] Encountered an unexpected exception NullPointerException
java.lang.NullPointerException
at dan200.computer.core.JarMount$FileInZip.getParent(JarMount.java:102)
at dan200.computer.core.JarMount.<init>(JarMount.java:164)
at dan200.ComputerCraft.createResourceMount(ComputerCraft.java:415)
at dan200.computer.shared.ItemTreasureDisk.getTreasureMount(ItemTreasureDisk.java:227)
at dan200.computer.shared.ItemTreasureDisk.registerDungeonLoot(ItemTreasureDisk.java:159)
at dan200.computer.shared.ComputerCraftProxyCommon$ForgeHandlers.onWorldLoad(ComputerCraftProxyCommon.java:578)
at net.minecraftforge.event.ASMEventHandler_5_ForgeHandlers_onWorldLoad_Load.invoke(.dynamic)
at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:39)
at net.minecraftforge.event.EventBus.post(EventBus.java:108)
at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:85)
at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:443)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
I'm using the latest version of forge
1243 posts
Location
Indiana, United States
Posted 07 August 2013 - 10:25 PM
You copied the assets folder, right?
718 posts
Location
Hawaii
Posted 07 August 2013 - 11:31 PM
You copied the assets folder, right?
Yea
4 posts
Location
Ireland
Posted 09 August 2013 - 04:00 AM
Thank you so much for this!
I'm a little rusty from my modloader times, so this is great for me with all the new-fangled stuff :D/>
6 posts
Posted 10 August 2013 - 03:00 AM
For anyone reading this later, I suspect his problem was not putting Computercraft*.zip in the <mcpdir>/jars/mods/ folder.
That said,
You're not supposed to see the classes in Eclipse. Computercraft is definitely not open source and I do not know how nor would I tell how to view the source code. (That's not some BS disclaimer; I seriously don't know and wouldn't tell if I did.)
The issue was that I forgot to put the .zip suffix on the file after I deobfuscated it. I guess I failed to see the purpose of it and just assumed from other mods that I could. My bad. There goes my idea for a mod then.
7508 posts
Location
Australia
Posted 18 October 2013 - 12:50 PM
An even easier method now is to put ChickenBonesCore into the mcp/jars/mods folder and it will download ChickenBonesLib, this single mod (Lib) allows for an obf'd mod to run in a deobf'd environment.
This allows for testing your mod against any other mod that's installed into the mods folder, without the worry or problem of deobf'ing a mod, and adding it to Eclipse making sure to get package structure perfect.
It makes adding mod support 300x quicker and much easier!
Hope this helps everyone.
— BIT
1243 posts
Location
Indiana, United States
Posted 18 October 2013 - 04:33 PM
Yes, I recommend theoriginalbit's strategy.
7508 posts
Location
Australia
Posted 18 October 2013 - 04:34 PM
Yes, I recommend theoriginalbit's strategy.
LOL! Very different to what you were saying on IRC :P/>
226 posts
Location
Earth
Posted 06 March 2014 - 03:22 AM
codechickencore?… or bon…
7508 posts
Location
Australia
Posted 06 March 2014 - 04:22 AM
codechickencore?… or bon…
CodeChickenCore … it downloads ChickenBonesLib which allows obfuscated mods (these are the zips/jars you use normally) to run in a deobfuscated environment.