Class dump

Hello, i need use a classDump:
-Dlegacy.debugClassLoading=true -Dlegacy.debugClassLoadingSave=true
but its not work for 1.16.5. How can I do this on 1.16.5? I did not find an answer to ForgeForum, and they do not provide such help, which is strange. I will be extremely grateful for any help

How come you want a class dump? Just looking for the classes that are loaded or you after something more specific?

I want to track down one error, but for this I need a dump of classes. But forge has somehow changed a lot in this regard, I know how to do it for userdev, but I have no idea how to do it for an already assembled project

So the next question is what type of class dump. As far as im aware, there are 3.

The dump of the compiled code
The dump of decompiled code
The javadoc styled dump of the code

Which would you like?

The dump of the compiled code

Similar to how it was on 1.12
-Dlegacy.debugClassLoading=true -Dlegacy.debugClassLoadingSave=true

Hi, I havent forgotten about this post.

Due to the fact I have been working with API 8 for so long and not on API 7, I don’t have Java 8 installed on my machine which is required for MC 1.12.2. Tried with Bukkit however they don’t support those arguments, so it was a case on finding the time to get a example of what the format looks like (none online either)

Just managed to get Java 8 installed, loaded up SpongeVannila and still didnt work. Forge 1.12.2 doesnt complain at the arguments but doesnt seem to do anything with them added (same result as if you just try “sdfsdfasdasdsa” into it as a argument).

I cannot find any documentation on how they should work in the first place, just reports of people having it enabled in crash reports.

Without knowning the format of how it should output, I cannot help you futher

@MoseMister The flags control LegacyLauncher LegacyLauncher/LaunchClassLoader.java at master · Mojang/LegacyLauncher · GitHub

They dump the class bytecode to disk after running classes through the transformer pipeline. I do not know how 1.16.5 launching works (I haven’t looked past 1.12), but if legacylauncher is still used I’d expect this to work.

Sponge’s Mixin also has class dump options, which may be of interest Mixin Java System Properties · SpongePowered/Mixin Wiki · GitHub
Something like -Dmixin.debug.export=true

1 Like

Ahhhh its a system property, thats why it didnt work, I was trying it as a application argument.

Just looked though the source, cannot see any reference to anything like it in the minecraft source code in 1.16. I can say that the legacy launcher isnt used in 1.13+.

As for the issue at hand, yeah the Mixins is probably the best bet