Posted December 15, 201410 yr I'm stumped. I currently began a re-write of my mod to remove as much version dependency as possible. This involved switching from Notch names to Srg names and switching my @IFMLLoadingPlugin.SortingIndex() from 100 to 1001 to run all changes post runtime deobfuscation. This worked perfectly well, but once I went on to testing out an idea for finding a LocalVariableNode's index based on it's name/desc I ran into something I don't quite understand. public void setIsSpawningFromSpawnerTrue(MethodNode method) { BnBTweaks.Log.info("Printing " + method.localVariables.size() + " LocalVariableNodes in: " + method.name); for (LocalVariableNode lvNode : method.localVariables) { BnBTweaks.Log.info(lvNode.name + " " + lvNode.desc + " " + lvNode.index + " " + lvNode.signature); } Above is a code snippet I wrote to get some information about local variables within the current method that I could use to write a method for finding the local variable indexs. Back when I was running pre runtime obfuscation, this would've printed out everything quite nicely for me. Now that I'm running post though, it seems that method.localVariables.size() is 0, and therefore I can get no information. [11:27:52] [server thread/INFO] [bnBTweaks/]: Printing 0 LocalVariableNodes in: func_98278_g Why might this be?
December 16, 201410 yr Author Haha, of course! As usual, the thing I got stuck on was obvious from outside the cloud of frustration . Wish I had thought to check the thread again before deleting literally everything and re-downloading to be sure it wasn't a corruption issue . Now to just think of some other way to verify variables are correctly targeted (without using a second transformer ). Can't think of a different approach yet though.... I feel properly dumb now . Many thank yous diesieben07!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.