Closed thomas-ej-worm closed 5 months ago
then im guessing this is also a fernflower issue. try decompiling with the default decompiler(simply replace --decompile fernflower
with --decompile
or -d
)
Thanks. This solved nested classes not getting decompiled but leads to other problems.
E.g. in com.mojang.math.OctahedralGroup
the renamed local variables (method parameters) are not decompiled correctly:
private OctahedralGroup(final String param3, final SymmetricGroup3 param4, final boolean param5, final boolean param6, final boolean param7) {
this.name = s;
this.invertX = flag;
this.invertY = flag1;
this.invertZ = flag2;
this.permutation = symmetricgroup3;
this.transformation = new Matrix3f().scaling(flag ? -1.0F : 1.0F, flag1 ? -1.0F : 1.0F, flag2 ? -1.0F : 1.0F);
this.transformation.mul(symmetricgroup3.transformation());
}
s
, flag
, and so on are unknown symbols, because function parameters are called param
X.
With using FernFlower as decompiler the rename option of MinecraftDecompiler is handled correctly:
private OctahedralGroup(final String s, final SymmetricGroup3 symmetricgroup3, final boolean flag, final boolean flag1, final boolean flag2) {
this.name = s;
this.invertX = flag;
this.invertY = flag1;
this.invertZ = flag2;
this.permutation = symmetricgroup3;
this.transformation = (new Matrix3f()).scaling(flag ? -1.0F : 1.0F, flag1 ? -1.0F : 1.0F, flag2 ? -1.0F : 1.0F);
this.transformation.mul(symmetricgroup3.transformation());
}
https://github.com/MaxPixelStudios/MinecraftDecompiler/actions/runs/9148385977 you can download and use the artifact in this run this version uses an updated version of vineflower
an alternative is to use the user-defined decompiler:
put the config file at decompiler/decompiler.properties
follow the config file and put your decompiler jar at the right path
decompiler.txt github doesn't allow uploading .properties files, you need to rename it yourself
if you did everything right, you will get something like this except that vineflower is version 1.10.1
then replace arg -d
with -d user-defined
and run mcd
Close as this is a decompiler error, which is not the problem on this project's end.
Integrated decompilers may be outdated, but you can use their latest version through the user-defined decompiler feature.
Describe the bug
Hello,
I want to decompile the MC source with
java -jar MinecraftDecompiler --decompile fernflower -r --version 1.20.6 -s SERVER
There are some decompiling problems like varargs getting prefixed with array type like
(Object[]) (object1, object2, object3)
which leads to compiling failures. I think these are FernFlower issues.
But the problem I mostly am faced with is that nested public classes are not decompiled.
E.g. in the deobfuscated jar there are
NaturalSpawner$SpawnState.class
orAnyBlockInteractionTrigger$TriggerInstance.class
.It seems that all classes with $ in name are ignored. So a lot code is missing in the decompiled code.
To Reproduce Steps to reproduce the behavior:
java -jar MinecraftDecompiler --decompile fernflower -r --version 1.20.6 -s SERVER
NaturalSpawner.SpawnState
in decompiled code.Expected behavior Nested classes will be present!
System Info:
openjdk:23-bookworm
image.