Coder Social home page Coder Social logo

maxpixelstudios / minecraftdecompiler Goto Github PK

View Code? Open in Web Editor NEW
264.0 8.0 17.0 34.9 MB

Minecraft Decompiler. A useful tool/library to deobfuscate and decompile Minecraft(or any jar file) through popular mappings and various decompilers. Or use it as a lib to process obfuscation mappings such as converting a mapping to another format

License: GNU General Public License v3.0

Java 99.91% PowerShell 0.09%
minecraft deobfuscator srg tsrg csrg notch proguard deobfuscate-minecraft decompile tiny

minecraftdecompiler's Introduction

Java CI with Maven Discord

MinecraftDecompiler

A useful tool/library to deobfuscate Minecraft using Proguard(official)/SRG/CSRG(Bukkit,Spigot,Paper)/TSRG(SRG 1.13+)/TSRG v2(SRG 1.16.5+)/Tiny(Intermediary, Yarn) mappings and decompile Minecraft using CFR/FernFlower/ForgeFlower/Any Decompiler You Like

Note: Java16 has been required since v2.3. Java17 has been required since v3.0

Progress: View the project and the milestone

For usage and more information, visit the wiki(Currently in progress)

Features

  1. Deobfuscate Minecraft using Proguard(Official) mappings, SRG, TSRG, CSRG and Tiny mappings
  2. Decompile Minecraft using CFR/Fernflower/ForgeFlower/Any Decompiler You Like
  3. Regenerate local variable names in JAD style
  4. Mapping API

Community

Discord: https://discord.gg/pjQd8PVk3t
GH Discussions: https://github.com/MaxPixelStudios/MinecraftDecompiler/discussions
KOOK/开黑啦: https://kook.top/WI8xyn
QQ群(加群请注明理由: MinecraftDecompiler): 814722661
QQ频道: https://pd.qq.com/s/1ospru74

Special Thanks

JetBrains - Provide awesome IDEs and free license codes

JetBrains

minecraftdecompiler's People

Contributors

dependabot[bot] avatar xiaopangxie732 avatar zomb-676 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minecraftdecompiler's Issues

[BUG] Idk if im stupid but the jar isnt working

To Reproduce
Steps to reproduce the behavior:

  1. open the file???

The log

A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000069ac29bf, pid=19840, tid=15964
#
# JRE version: Java(TM) SE Runtime Environment (17.0.6+9) (build 17.0.6+9-LTS-190)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.6+9-LTS-190, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C  [jansi-2.4.0-ef95217057b95830-jansi.dll+0x29bf]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  S U M M A R Y ------------

Command Line: D:\MinecraftDecompiler\MinecraftDecompiler.jar

Host: Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz, 8 cores, 7G,  Windows 10 , 64 bit Build 19041 (10.0.19041.2546)
Time: Thu Apr  6 21:36:06 2023 Central Daylight Time elapsed time: 1.149897 seconds (0d 0h 0m 1s)

[BUG] [3.2] Not working (idk english well, sorry)

Describe the bug
not working

To Reproduce
Steps to reproduce the behavior:

  1. Pass args '...'
  2. See error

Args:
java -jar MinecraftDecompiler.jar "-d USER_DEFINED" arg
pause
(arg = -log=TRACE -dgs=1 -asc=1 -udv=0 -ump=0 -rsy=1 -aoa=1 -e=%lib_repeat% %source% %target%)
Expected behavior

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
C:\Users\OS\Desktop\1>java -jar MinecraftDecompiler.jar "-d USER_DEFINED" arg
Exception in thread "main" joptsimple.MissingRequiredOptionsException: Missing required option(s) [m/map/mapping-path, i/input]
at joptsimple.OptionParser.ensureRequiredOptions(OptionParser.java:435)
at joptsimple.OptionParser.parse(OptionParser.java:409)
at cn.maxpixel.mcdecompiler.MinecraftDecompilerCommandLine.main(MinecraftDecompilerCommandLine.java:89)
C:\Users\OS\Desktop\1>pause

System Info:

  • OS: [e.g. Windows 10]
  • Arch: [e.g. x64]
  • Java: [JDK 17]
  • MinecraftDecompiler Version [3.2]

Additional context
.

[Feature Request] Improve the logging service

Describe the solution you'd like
Support customizing log message styles and don't cache messages(StreamHandler uses an 8192 char array to cache log messages).

Describe alternatives you've considered
Create another repo and write another simple logging service

[BUG] [2.5] [3.0] Cannot deobfuscate using namespaced mappings

Describe the bug
NamingUtil.findSourceNamespace used a deprecated way to get Descriptor.Namespaced component and this way has already been removed, so it will throw an exception.
After 1a351d9, LocalVariableTableRenamer executes after the class is mapped, but it still compares the name of the class with the unmapped name of the mapping to detect if this mapping matches this class

[Enhancement] Mapping type inference

Describe the solution you'd like

  • Add a new api that is like a voting system to infer the mapping type.
  • Add an option to specify the provided mapping type manually.

[Enhancement] Omit -t for namespaced mappings if there are only two namespaces

Is your enhancement related to a problem? Please describe.
When remapping with a namespaced mapping, I always need to write -t though there are only two namespaces(which means the target namespace is already known).

Describe the solution you'd like
Omit -t for namespaced mappings if there are only two namespaces

Describe alternatives you've considered
Keep everything not changed

Additional context
Currently, it is a bit complex to retrieve all namespaces. The current design should be tweaked first.

[BUG] [2.5] [3.0] Namespaced field mapping doesn't have Owned component when converting to paired mapping

Will cause:

Exception in thread "main" java.lang.UnsupportedOperationException: java.lang.UnsupportedOperationException
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:562)
	at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:591)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:689)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:927)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at cn.maxpixel.mcdecompiler.asm.ClassifiedMappingRemapper.<init>(ClassifiedMappingRemapper.java:74)
	at cn.maxpixel.mcdecompiler.ClassifiedDeobfuscator.deobfuscate(ClassifiedDeobfuscator.java:120)
	at cn.maxpixel.mcdecompiler.MinecraftDecompiler.deobfuscate(MinecraftDecompiler.java:81)
	at cn.maxpixel.mcdecompiler.MinecraftDecompilerCommandLine.main(MinecraftDecompilerCommandLine.java:139)
Caused by: java.lang.UnsupportedOperationException
	at cn.maxpixel.mcdecompiler.mapping1.collection.ClassMapping.addField(ClassMapping.java:106)
	at cn.maxpixel.mcdecompiler.asm.ClassifiedMappingRemapper.lambda$asPaired$1(ClassifiedMappingRemapper.java:83)
	at it.unimi.dsi.fastutil.objects.ObjectArrayList.forEach(ObjectArrayList.java:787)
	at cn.maxpixel.mcdecompiler.asm.ClassifiedMappingRemapper.asPaired(ClassifiedMappingRemapper.java:83)
	at cn.maxpixel.mcdecompiler.asm.ClassifiedMappingRemapper.lambda$new$0(ClassifiedMappingRemapper.java:73)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at it.unimi.dsi.fastutil.objects.ObjectArrayList$Spliterator.forEachRemaining(ObjectArrayList.java:982)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:960)
	at java.base/java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:934)
	at java.base/java.util.stream.AbstractTask.compute(AbstractTask.java:327)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

A stupid bug for mapping reader

I found that there is, and always only one class could not be deobfuscated when I debugging.When debugging, I found that there is only one class that cannot be deobfuscated. The remapper couldn't find mapping for the class. Then I found the mapping in the last of the file will not be read

[Enhancement] Mapping Provider API

Is your enhancement related to a problem? Please describe.
Currently, MCD only supports downloading official mappings. This could be inconvenient when using other mappings.

Describe the solution you'd like
Introduce the Mapping Provider API. It can:

  • Be discovered through SPI
  • Provide a list of mapping versions
  • Select and download mappings

Additional context
This also has an association with #82 . This enables interactive console users to conveniently choose the mappings they want.

Cannot decompile latest snapshots

Description:
When trying to decompile minecraft version 24w14a and later error is outputted

Steps to reproduce the behavior:

  1. Pass args '--version 24w14a --side CLIENT --output dir\24w14a.zip'
  2. See error

Expected behaviour:
Version is downloaded and decompiled, without any errors.

Logs:

C:\Users\User\Desktop\MinecraftDecompiler>java -jar MinecraftDecompiler.jar --version 24w14a --side CLIENT --output dir\24w14a-client.zip
[2024-04-15T21:11:51.3271352] [ClassifiedDeobfuscator] [INFO] [cn.maxpixel.mcdecompiler.ClassifiedDeobfuscator/deobfuscate] Deobfuscating...
Exception in thread "main" java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unsupported class file major version 65
        at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)


[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)


[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

        at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:540)[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2341)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)


[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

        at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:567)[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)


[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.io.EOFException: Unexpected end of ZLIB input stream
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2275)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

        at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:670)[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.io.EOFException: Unexpected end of ZLIB input stream
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2275)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)


[2024-04-15T21:11:51.4011265] [Class Info Collector] [WARNING] [cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation/accept] Error when creating super class mapping
java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:203)
        at java.base/sun.nio.ch.FileChannelImpl.endBlocking(FileChannelImpl.java:172)
        at java.base/sun.nio.ch.FileChannelImpl.readInternal(FileChannelImpl.java:992)
        at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:964)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1241)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.readFullyAt(ZipFileSystem.java:1236)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.initDataPos(ZipFileSystem.java:2386)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$EntryInputStream.read(ZipFileSystem.java:2328)
        at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem$2.fill(ZipFileSystem.java:2278)
        at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175)
        at java.base/java.io.FilterInputStream.read(FilterInputStream.java:95)
        at cn.maxpixel.mcdecompiler.util.IOUtil.readAllBytes(IOUtil.java:49)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

        at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
        at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.<init>(ExtraClassesInformation.java:47)
        at cn.maxpixel.mcdecompiler.ClassifiedDeobfuscator.deobfuscate(ClassifiedDeobfuscator.java:122)
        at cn.maxpixel.mcdecompiler.MinecraftDecompiler.deobfuscate(MinecraftDecompiler.java:81)
        at cn.maxpixel.mcdecompiler.MinecraftDecompilerCommandLine.main(MinecraftDecompilerCommandLine.java:124)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:199)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
        at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:54)
        at cn.maxpixel.mcdecompiler.asm.ExtraClassesInformation.accept(ExtraClassesInformation.java:34)
        at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
        at cn.maxpixel.mcdecompiler.util.FileUtil.lambda$iterateFiles$0(FileUtil.java:138)
        at java.base/java.util.stream.ReferencePipeline$11$1.accept(ReferencePipeline.java:450)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

System Info:

  • OS: Windows 10
  • Arch: x64
  • Java: OracleJDK 21.0.2
  • MinecraftDecompiler Version 3.2

[BUG] [2.4-RELEASE] There is a lot of garbled code in the decompiled code

Describe the bug
There is a lot of garbled code in the decompiled code.
I don't think this may be a problem with this program, but I want help.

To Reproduce
Steps to reproduce the behavior:

  1. Decompile Minecraft 1.16.5 with Official mapping.
  2. Open source codes with IntelliJ IDEA.
  3. Too many grabled codes here!!!

Expected behavior
A clear and concise description of what you expected to happen. Delete this section if the expected behavior is obvious

Screenshots
QQ截图20210822195932

Logs
No log, thanks.

System Info:

  • OS: Windows 7
  • Arch:: x64
  • Java: AdoptOpenJDK HotSpot 16
  • MinecraftDecompiler Version 2.4-Release

[BUG] [2.3-SNAPSHOT] Field/Method duplicate when remapping

Describe the bug
Field duplicate when remapping

To Reproduce
Steps to reproduce the behavior:

  1. Run MCD
  2. See error

Expected behavior
Run successfully

System Info:

  • OS: Windows 10
  • Arch: x64
  • Java: AdoptOpenJDK HotSpot 16.0.1+9
  • MinecraftDecompiler Version 2.3-SNAPSHOT

Additional context
This is because when processing fields in super classes, SC1 class has an inaccessible field, SC2 class has an accessible field. They may have the same obfuscated name. But MinecraftDecompiler doesn't know how to choose because it can't get the field's access flags when deobfuscating.

[Enhancement] Support unpick

Is your enhancement related to a problem? Please describe.
mcd does not support unpick

Describe the solution you'd like
support unpick

Describe alternatives you've considered
keep everything not changed

[BUG] [2.5] The decompiler is weird and none of them work.

Decompiler was ran using the following arguments:

--output ./outMap --d SPIGOT --outputDecomp ./outDecomp --side CLIENT --version 1.17.1

All the decompilers don't work and many of them produce unknown characters. and when using the "--rvn" option, referencing the the class it self using "this" doesn't work, what I mean by doesn't work here is that it does not use "this" at all.

I hope you get better decompilers added very soon.

Example of output code, this piece is found on the constructor of "net.minecraft.client.server.IntegratedServer"

super(☃, ☃, ☃, ☃, ☃, ☃.getProxy(), ☃.getFixerUpper(), ☃, ☃, ☃, ☃, ☃);

[BUG] [3.3-SNAPSHOT] `*` could expand to other things in a terminal

Describe the bug
Given srg mappings, all occurences in the input jar file should be replaced; but nothing is renamed.

To Reproduce
Steps to reproduce the behavior:

  1. Pass args -i testmod.jar -o mapped.jar -m forge.srg
  2. Decompile with anything (I used vineflower)
  3. See something that is supposed to be mapped but is not. For example, Player.inventory
  4. Try again with args -i test.jar -o mapped.jar -m forge.srg --reverse
  5. Try forwards and backwards again but decompiling first (still into a jar)
  6. See the same behaviour

Expected behavior
Given srg mappings, all relavent occurences in the input jar file should be replaced. At least one of the reverse or non-reverse options should rename according to the srg file.

forge.srg
CL: com/mojang/blaze3d/Blaze3D com/mojang/blaze3d/Blaze3D
CL: com/mojang/blaze3d/DontObfuscate com/mojang/blaze3d/DontObfuscate
CL: com/mojang/blaze3d/FieldsAreNonnullByDefault com/mojang/blaze3d/FieldsAreNonnullByDefault
...
FD: net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator/f_188605_ net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator/surfaceSystem
FD: net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator/f_188607_ net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator/globalFluidPicker
FD: net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator/f_209104_ net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator/router
...
MD: net/minecraft/world/item/ItemStack/m_41617_ ()V net/minecraft/world/item/ItemStack/updateEmptyCacheFlag ()V
MD: net/minecraft/world/item/ItemStack/m_41618_ ()I net/minecraft/world/item/ItemStack/getHideFlags ()I
MD: net/minecraft/world/item/ItemStack/m_41619_ ()Z net/minecraft/world/item/ItemStack/isEmpty ()Z
...

[BUG] [2.2-3.0] Incorrectly remapping unmapped array type to mapped type

First appeared:

remappedDescriptor.append(mapToUnmapped(unmappedType.getElementType()));

Now:

return "[".repeat(Math.max(0, unmappedType.getDimensions())) + mapToUnmapped(unmappedType.getElementType());

They all should be mapToMapped instead of mapToUnmapped

[Enhancement] Support mixin classes

Is your enhancement related to a problem? Please describe.
Someone wants to remap a mod jar but found that shadow fields etc. are not remapped

Describe the solution you'd like
Give extra remapping to mixin classes

[BUG] Decomplication failure that can't be fixed

I am trying to decompile minecraft version 1.17.1 and I am executing the JAR file with the arguments:

--d CFR --input "./1.17.1.jar" --mappingPath "./clientmappings.txt" --outputDecomp "./output/"

Every file exists except for "deobfuscated.jar" that should be generated by the code it self.

But your code thinks that this file does not exist so I am getting this exception and the decomplication fails:

←[m←[31m[2021-12-05 14:50:34] [MinecraftDecompiler] [cn.maxpixel.mcdecompiler.MinecraftDecompiler] [FATAL] Error when decompiling
←[m java.nio.file.NoSuchFileException: C:\Users\novastosha\Application Data\Desktop\ZodaClient Preperations\output\deobfuscated.jar
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[?:?]
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[?:?]
at sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:74) ~[?:?]
at sun.nio.fs.WindowsLinkSupport.getRealPath(WindowsLinkSupport.java:241) ~[?:?]
at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:933) ~[?:?]
at sun.nio.fs.WindowsPath.toRealPath(WindowsPath.java:42) ~[?:?]
at jdk.nio.zipfs.ZipFileSystemProvider.lambda$removeFileSystem$0(ZipFileSystemProvider.java:305) ~[jdk.zipfs:?]
at java.security.AccessController.doPrivileged(AccessController.java:569) ~[?:?]
at jdk.nio.zipfs.ZipFileSystemProvider.removeFileSystem(ZipFileSystemProvider.java:307) ~[jdk.zipfs:?]
at jdk.nio.zipfs.ZipFileSystem.close(ZipFileSystem.java:521) ~[jdk.zipfs:?]
at cn.maxpixel.mcdecompiler.MinecraftDecompiler.decompile0(MinecraftDecompiler.java:145) [MinecraftDecompiler.jar:2.4]
at cn.maxpixel.mcdecompiler.MinecraftDecompiler.decompile(MinecraftDecompiler.java:111) [MinecraftDecompiler.jar:2.4]
at cn.maxpixel.mcdecompiler.MinecraftDecompilerCommandLine.main(MinecraftDecompilerCommandLine.java:141) [MinecraftDecompiler.jar:2.4]

Help is appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.