Dykam / tabbychat

TabbyChat chat mod for Minecraft
16 stars 0 forks source link

LiteMod not reobfuscating #30

Closed mattmess1221 closed 10 years ago

mattmess1221 commented 10 years ago

No crash, but I get an error when loaded into an obfuscated game.

[18:32:21 INFO]: Client> [18:32:21] [Client thread/WARN] [LiteLoader]: Error initialising mod 'TabbyChat'
[18:32:21 INFO]: Client> java.lang.NoSuchMethodError: net.minecraft.client.Minecraft.getMinecraft()Lnet/minecraft/client/Minecraft;
[18:32:21 INFO]: Client>    at acs.tabbychat.core.LiteModTabbyChat.init(LiteModTabbyChat.java:44) ~[LiteModTabbyChat.class:?]
[18:32:21 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoader.initMod(LiteLoader.java:962) ~[LiteLoader.class:1.7.2_04]
[18:32:21 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoader.initMods(LiteLoader.java:926) [LiteLoader.class:1.7.2_04]
[18:32:21 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoader.postInit(LiteLoader.java:284) [LiteLoader.class:1.7.2_04]
[18:32:21 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoaderBootstrap.postInit(LiteLoaderBootstrap.java:192) [LiteLoaderBootstrap.class:1.7.2_04]
[18:32:21 INFO]: Client>    at com.mumfrey.liteloader.launch.LiteLoaderTweaker.postInit(LiteLoaderTweaker.java:617) [liteloader-1.7.2.jar:1.7.2_04]
[18:32:21 INFO]: Client>    at net.minecraft.client.renderer.entity.RenderLightningBolt.<init>(SourceFile) [bny.class:?]
[18:32:21 INFO]: Client>    at net.minecraft.client.renderer.entity.RenderManager.<init>(RenderManager.java:182) [bnf.class:?]
[18:32:21 INFO]: Client>    at net.minecraft.client.renderer.entity.RenderManager.<clinit>(RenderManager.java:102) [bnf.class:?]
[18:32:21 INFO]: Client>    at net.minecraft.client.Minecraft.func_71384_a(MinecraftOverlay.java:514) [azd.class:?]
[18:32:21 INFO]: Client>    at net.minecraft.client.Minecraft.func_99999_d(MinecraftOverlay.java:850) [azd.class:?]
[18:32:21 INFO]: Client>    at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]
[18:32:21 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_45]
[18:32:21 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_45]
[18:32:21 INFO]: Client>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_45]
[18:32:21 INFO]: Client>    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_45]
[18:32:21 INFO]: Client>    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
[18:32:21 INFO]: Client>    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Dykam commented 10 years ago

Isn't that introduced in f5fef9525bbb51652e17672dbcc558fc640aabe8?

Dykam commented 10 years ago

Issue still exists, but is less. Have to investigate why obfuscation is failing.

Dykam commented 10 years ago

The following line gets obfuscated properly in the default jar:

if (mc.thePlayer != null && mc.thePlayer.getCommandSenderName() != null) {

to:

if ((mc.field_71439_g != null) && (mc.field_71439_g.func_70005_c_() != null)) {

However in any extra jar it becomes:

if ((mc.field_71439_g != null) && (mc.field_71439_g.getCommandSenderName() != null)) {

I'll forward this report to MinecraftForge/ForgeGradle#68

Dykam commented 10 years ago

And fixed in @80ba7082a3

mattmess1221 commented 10 years ago

It works when forge is installed, but not with just liteloader. In fact, it kind of breaks the liteloader gui.

[19:56:54 INFO]: Client> [19:56:54] [Client thread/INFO]: Loading mod from acs.tabbychat.core.LiteModTabbyChat
[19:56:54 INFO]: Client> java.lang.NoClassDefFoundError: net/minecraft/util/IChatComponent
[19:56:54 INFO]: Client>    at acs.tabbychat.core.LiteModTabbyChat.<clinit>(LiteModTabbyChat.java:18)
[19:56:54 INFO]: Client>    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[19:56:54 INFO]: Client>    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[19:56:54 INFO]: Client>    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[19:56:54 INFO]: Client>    at java.lang.reflect.Constructor.newInstance(Unknown Source)
[19:56:54 INFO]: Client>    at java.lang.Class.newInstance(Unknown Source)
[19:56:54 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoader.loadMod(LiteLoader.java:889)
[19:56:54 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoader.loadMods(LiteLoader.java:855)
[19:56:54 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoader.postInit(LiteLoader.java:281)
[19:56:54 INFO]: Client>    at com.mumfrey.liteloader.core.LiteLoaderBootstrap.postInit(LiteLoaderBootstrap.java:192)
[19:56:54 INFO]: Client>    at com.mumfrey.liteloader.launch.LiteLoaderTweaker.postInit(LiteLoaderTweaker.java:617)
[19:56:54 INFO]: Client>    at bny.<init>(SourceFile)
[19:56:54 INFO]: Client>    at bnf.<init>(SourceFile:115)
[19:56:54 INFO]: Client>    at bnf.<clinit>(SourceFile:37)
[19:56:54 INFO]: Client>    at azd.Z(MinecraftOverlay.java:417)
[19:56:54 INFO]: Client>    at azd.e(MinecraftOverlay.java:689)
[19:56:54 INFO]: Client>    at net.minecraft.client.main.Main.main(SourceFile:103)
[19:56:54 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[19:56:54 INFO]: Client>    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[19:56:54 INFO]: Client>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[19:56:54 INFO]: Client>    at java.lang.reflect.Method.invoke(Unknown Source)
[19:56:54 INFO]: Client>    at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
[19:56:54 INFO]: Client>    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[19:56:54 INFO]: Client> Caused by: java.lang.ClassNotFoundException: net.minecraft.util.IChatComponent
[19:56:54 INFO]: Client>    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:188)
[19:56:54 INFO]: Client>    at java.lang.ClassLoader.loadClass(Unknown Source)
[19:56:54 INFO]: Client>    at java.lang.ClassLoader.loadClass(Unknown Source)
[19:56:54 INFO]: Client>    ... 23 more
[19:56:54 INFO]: Client> Caused by: java.lang.NullPointerException
[19:56:54 INFO]: Client>    at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:180)
[19:56:54 INFO]: Client>    ... 25 more
Dykam commented 10 years ago

That might be an issue with us relying on the forge builder. I'll ask on their support forums if I remember. Or you if you've time now http://www.minecraftforge.net/forum/index.php?board=118.0

mattmess1221 commented 10 years ago

We might be better off creating a liteloader plugin then apply it using apply plugin: liteloader

Dykam commented 10 years ago

That does sound like a good idea, I'll look into splitting off ForgeGradle this weekend. (Sidenote, it uses the Eclipse Public License, not too familiar with it. I'll just ask for permission first and what to do with trademarks). Might even be able to factor out a common ground (MCP). Note that this does require Mumfrey to put that unobfuscated build live. Or we'll deobfuscate it on the fly, but that's complicated.

mattmess1221 commented 10 years ago

No need to do that for now. I created MinecraftForge/ForgeGradle#70 and they'll get into customizing the reobf type.

Dykam commented 10 years ago

I've seen SRG being thrown around, what does it stand for? Is it the obfuscation mapping?

mattmess1221 commented 10 years ago

Kind of. In mcp, reobfuscate reobfs to the same as minecraft. With srg, it only partially reobfuscates it. Forge deobfs Minecraft to this state before it runs.