Jump to content




Reobfuscation Problems (Solved!)


6 replies to this topic

#1 TehSomeLuigi

  • Members
  • 70 posts

Posted 18 December 2012 - 05:53 AM

Edit2:
Solved myself:

Quote

And now I got the error again. But I had an idea, and so far it has seemed to have worked:

If you get an error when reobfuscating that says one of the Minecraft source classes is missing "net/minecraft/src/ItemStack" for me when BON'd ComputerCraft is in your libs, here is how you can fix it:

1- Pass the ComputerCraft mod file through immibis' Bearded Octo Nemesis. Put the resulting jar in /mcp/jars/mods/.
(do not put it in libs)
You can now do your testing with ComputerCraft installed.

2- Grab the ComputerCraft API. Put what is in ccapi.zip/src/ into mcp/src/common/, so you end up with a dan200 folder in there.


3- Go in to /common/dan200/turtle/api/ITurtleAccess.java and find the getPosition() method. Change "public net.minecraft.src.Vec3D getPosition();" to "public net.minecraft.src.Vec3 getPosition();" (I assume a mapping update broke this and renamed the Vec3D)..

4- You should be able to use the API correctly, and do your testing working with ComputerCraft OK too.

5- When you release your addon, you can delete the computercraft API files from your mod zip/jar.

6- Should be good.

I believe the reason you get those errors as stated above is because at reobfuscation the jars in the libs folder cannot be tested against the minecraft classes. I'm not entirely sure, so don't take my word for it.


#2 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 18 December 2012 - 12:41 PM

This has nothing to do with CC.

#3 TehSomeLuigi

  • Members
  • 70 posts

Posted 18 December 2012 - 12:43 PM

Hmm. I'll look a bit further into it. This has only been happening since I started the CC stuff. I wasn't quite sure.

#4 TehSomeLuigi

  • Members
  • 70 posts

Posted 18 December 2012 - 01:21 PM

I've thought a bit and decided this is probably a good time to rewrite the code I have because I followed a pretty bad tutorial & everything is messy. Sorry for wasting your time, maybe I'll be back later with a result I'll be able to share.

#5 TehSomeLuigi

  • Members
  • 70 posts

Posted 19 December 2012 - 06:21 AM

And now I got the error again. But I had an idea, and so far it has seemed to have worked:

If you get an error when reobfuscating that says one of the Minecraft source classes is missing "net/minecraft/src/ItemStack" for me when BON'd ComputerCraft is in your libs, here is how you can fix it:

1- Pass the ComputerCraft mod file through immibis' Bearded Octo Nemesis. Put the resulting jar in /mcp/jars/mods/.
You can now do your testing with ComputerCraft installed.
(do not put it in libs)

2- Grab the ComputerCraft API. Put what is in ccapi.zip/src/ into mcp/src/common/, so you end up with a dan200 folder in there.



3- Go in to /common/dan200/turtle/api/ITurtleAccess.java and find the getPosition() method. Change "public net.minecraft.src.Vec3D getPosition();" to "public net.minecraft.src.Vec3 getPosition();" (I assume a mapping update broke this and renamed the Vec3D)..

4- You should be able to use the API correctly, and do your testing working with ComputerCraft OK too.

5- When you release your addon, you can delete the computercraft API files from your mod zip/jar.

6- Should be good.

I believe the reason you get those errors as stated above is because at reobfuscation the jars in the libs folder cannot be tested against the minecraft classes. I'm not entirely sure, so don't take my word for it.

#6 immibis

    Lua God

  • Members
  • 1,033 posts
  • LocationWellington, New Zealand

Posted 19 December 2012 - 01:10 PM

Put the reobfuscated jar in jars/mods instead

#7 TehSomeLuigi

  • Members
  • 70 posts

Posted 20 December 2012 - 09:09 AM

View Postimmibis, on 19 December 2012 - 01:10 PM, said:

Put the reobfuscated jar in jars/mods instead

Yup, that's what I did.

Also, thanks for your tool :).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users