bytecode-viewer
bytecode-viewer copied to clipboard
fernflower doesn't preserve local var/parameter names always
java version: 1.8.0_321 version: Bytecode-Viewer-2.11.0
Issue: it will say var0 instead of saying meta as a local variable. I noticed this also occurs with parameter naming
steps to reprocude:
- download the minecraft.jar https://launcher.mojang.com/v1/objects/7b07fd09d1e3aae1bc7a1304fedc73bfe5d81800/client.jar
- download the mapping file https://launcher.mojang.com/v1/objects/a0bea08f0b96f6f30a350cd75270be63f7d0aac4/client.txt
- deob with recaf https://github.com/Col-E/Recaf and make sure to select proguard mappings
- export jar with recaf name it 1.15-deob.jar
- open jar with bytecode viewer
- decompile all classes using fernflower
- net/minecraft/world/item/ArrowItem.java notice the local var name is obfuscated while doing the same steps with cfr will result in a deob name
possible issues: did I try it using java 17 no? was an error thrown no. I also launched using start java -jar command and no visible errors.