This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
rewbycraft's profile picture

Running CC in eclipse. NPE

Started by rewbycraft, 23 December 2013 - 08:55 AM
rewbycraft #1
Posted 23 December 2013 - 09:55 AM
Hi all!

After having written several peripherals for CC I wanted to start doing it "properly".
E.g. using an IDE instead of just gedit and a Makefile.
Setting up eclipse wasn't too hard (although I did have to use the official linux dl because the version in my distro repos is hopelessly outdated, so I have kepler now), the MCF tutorials are very helpful.

The thing is that, unlike previously, I now have to use a deobfuscated version of CC.
I managed to deobfuscate it just fine using BON, eclipse is happy (although I can't find net.minecraft.src.GuiButton as the guide says I should) and minecraft boots just fine.
The problem arises when I try to enter a world (created a new world to see if my new blocks are registering correctly, even if they don't do anything).
I get this error:
Spoiler

java.lang.NullPointerException
2013-12-23 15:37:48 [INFO] [STDOUT]	 at dan200.computer.core.JarMount$FileInZip.getParent(JarMount.java:102)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at dan200.computer.core.JarMount.<init>(JarMount.java:164)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at dan200.ComputerCraft.createResourceMount(ComputerCraft.java:430)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at dan200.computer.shared.ItemTreasureDisk.getTreasureMount(ItemTreasureDisk.java:223)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at dan200.computer.shared.ItemTreasureDisk.registerDungeonLoot(ItemTreasureDisk.java:155)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at dan200.computer.shared.ComputerCraftProxyCommon$ForgeHandlers.onWorldLoad(ComputerCraftProxyCommon.java:583)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraftforge.event.ASMEventHandler_5_ForgeHandlers_onWorldLoad_Load.invoke(.dynamic)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraftforge.event.ASMEventHandler.invoke(ASMEventHandler.java:39)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraftforge.event.EventBus.post(EventBus.java:108)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:85)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:107)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
2013-12-23 15:37:48 [INFO] [STDOUT]	 at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
It would seem it has issues reading it's zip file. Archive Manager says that the file is fine. I do have the assets folder there and everything!
I have tried the CodeChickenCore method, but cc just keeps complaining about some field not existing on MC boot.

I am using the latest recommended MCF (953). Clean setup following tutorials.
I have not yet put in any code using the CC api (just a basic block to see if i could make it work).

Help much appreciated!

P.S. Sorry for my english, it's not my native language.

Greetings,
rewbycraft

EDIT: Forgot to spoiler the error.
Edited on 23 December 2013 - 08:55 AM
theoriginalbit #2
Posted 23 December 2013 - 08:13 PM
You don't need to deobf CC, you don't need to deobf any mod, ever!

http://www.computercraft.info/forums2/index.php?/topic/14131-how-to-properly-deobfuscate-computercraft-for-use-in-eclipse-155-only/page__view__findpost__p__149411
rewbycraft #3
Posted 24 December 2013 - 06:42 AM
You don't need to deobf CC, you don't need to deobf any mod, ever!

http://www.computerc...post__p__149411

*facepalm* I had tried it before and it didn't work. Turns out my CodeChickenCore had gotten corrupted somehow, new one and it works just fine!

Thanks for the help TheOriginalBit, I really need to check file integrity more often…

If an admin sees this, please close the thread. (I don't know how).
Edited on 24 December 2013 - 05:43 AM
theoriginalbit #4
Posted 24 December 2013 - 07:17 AM
If an admin sees this, please close the thread. (I don't know how).
For future reference click the "report" button and type "lock please", admins/moderators do not always see textual requests. You do not need to do it now however, I have done it for you.