Jump to content




[Solved] Unable to re-obfuscate and run


  • You cannot reply to this topic
11 replies to this topic

#1 someone9999

  • New Members
  • 19 posts

Posted 09 November 2012 - 08:38 PM

Basically, I have been working on a simple peripheral for turtles, and when it is ran through mcp and eclipse, it works perfectly. When running in mcp, I do have the full computer craft mod running by using immibis' Bearded Octo Nemesis. The problem happens when I re-obfuscate, and put both Computer Craft and my add-on into the mods folder.

The problem it has is that the class dan200.turtle.api.ITurtleUpgrade is not found at runtime. I have checked to make sure that this was the location of the class when compiling the mod, but have been unsuccessful in figuring out how to fix the issue.

The class that seems to be causing the issue (mod_CCAddons.java)

Spoiler


The crash log:
Spoiler

Any help would be greatly appreciated. Thanks.


Edit: Some extra information, probably not important.
The peripheral that this mod adds in a upgrade to a turtle that allows the user to get the block id, block name, block metadata, and block count from the currently selected slot in the turtle.

Edit 2:
Thanks for the help Espen and Cloudy! I really appreciate it.
For anyone in the future who has the same problem as me, make sure that you add a mcmod.info file to your .zip, and list CCTurtle as a dependency.

Ex:
[
{
"modid": "someone9999.ccaddons",
"dependencies": [
"mod_MinecraftForge",
"CCTurtle"
],
"useDependencyInformation": "true"
}
]


#2 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 09 November 2012 - 08:46 PM

What exactly is the folder structure of your cc3.zip file?
For example, the file mod_CCAddons.class should be located in the folder someone9999/ccaddons/ within your zip file.
Is that the case?

#3 someone9999

  • New Members
  • 19 posts

Posted 09 November 2012 - 08:50 PM

@Espen

Yes, that is the case.

The zip includes:
/someone9999/ccaddons/mod_CCAddons.class
/someone9999/ccaddons/TurtleUpgradeAnalyzer.class
/someone9999/ccaddons/TurtlePeripheralAnalyzer.class
/someone9999/ccaddons/RenderProxyServer.class
/someone9999/ccaddons/RenderProxyClient.class
/someone9999/ccaddons/IRenderProxy.class
/someone9999/ccaddons/ItemAnalyzer
/ccaddons/terrain.png

Thanks for the speedy reply.

#4 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 09 November 2012 - 09:05 PM

Hmm, I'm not really seeing the problem. I noticed that you still use the old Modloader way by extending BaseMod.
I don't know if that might be an issue, since it seems to work when when you start directly from eclipse.

Could you perhaps also post your .minecraft/ForgeModLoader-client-0.log file?
It is much more detailed regarding the loading process. Thanks! :unsure:/>

#5 someone9999

  • New Members
  • 19 posts

Posted 09 November 2012 - 09:10 PM

Of course.

Here is the .minecraft/ForgeModLoader-client.0.log file:
Spoiler

I'm personally stumped at the issue.

#6 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 09 November 2012 - 09:23 PM

That's really odd. Are you making use of the ComputerCraft API? If so, maybe include it in your project.
It shouldn't really be necessary because it's already in the ComputerCraft zip-file, but at the moment I'm stumbling in the dark as well.^^
Would you mind uploading your zip file so we can try it ourselves? Just if you don't mind.

P.S.: If you haven't noticed it already: you might want to search&replace your name in the log-file if you don't want it to be public.

#7 someone9999

  • New Members
  • 19 posts

Posted 09 November 2012 - 09:31 PM

Sure.

http://dl.dropbox.co...3952279/cc5.zip

I'll try adding the api to the zip and see if that works.

Thanks for the catch on the name.

Edit: Adding the api files directly to the zip with the obfuscated class files works. This befuddles me, but it works now. Thanks!

Edit 2: Adding the zip without the api files to a minecraft folder that has another computer peripheral installed, such as cables seems to allow the mod to work as well.

#8 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 09 November 2012 - 09:45 PM

Yep, just confirmed the same error, as well as getting it to work with the API files included in the project.
I always put them in my project without really thinking about it. In the back of my mind I guess I just assumed that having ComputerCraft in the mods folder as well would be enough and I was just over-careful.

But thinking about it now, it makes sense, as every mod loads in its own namespace. Therefore you have to include the API explicitly?
Hmm, I'm not too sure at the moment, but I'm glad you got it working.
I really need to take a nap now, it's almost 10 in the morning (again) and I haven't slept yet.
Cu & have fun! :unsure:/>

#9 someone9999

  • New Members
  • 19 posts

Posted 09 November 2012 - 09:48 PM

Your right, It probably is something to do with namespaces.

Thanks for all the help in getting my mod to work. I really appreciate it.

#10 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 09 November 2012 - 10:04 PM

Ok, I think I found the reason. The API interfaces included in the ComputerCraft zip are the latest ones, whereas the separately released API interfaces aren't.
And since they are different they are incompatible with each other.

So I guess in the future I'll just ignore the separate (older) API interface and just use the ones from the deobfuscated ComputerCraft zip directly.
That is, as long as it doesn't reference base classes and only contains "cleanly" deobfuscated names, if you know what I mean.

Alright, learned something as well, so thank you too.^^

Cu

#11 Cloudy

    Ex-Developer

  • Members
  • 2,543 posts

Posted 09 November 2012 - 10:21 PM

The issue is your mod is getting loaded before ComputerCraft. That is happening because you didn't set ComputerCraft as a requirement to load after - check the BaseMod spec for how to do that.

It is nothing todo with old API interfaces - we haven't changed the location nor substantially changed the API's to the extent it would cause an issue (except with two functions, and that would be a different error).

#12 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 09 November 2012 - 10:46 PM

Ok, I just remembered that I set this up many weeks ago in the mcmod.info when I first created the mod-skeleton and have never since thought about it.
No wonder I never encountered this problem with my own mods from then on.
Now I know why, lol. Thanks for bringing illumination to this issue. :unsure:/>





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users