Skip to content

Commit e4464f2

Browse files
Add a check to ensure the decompiler source type is DIRECTORY when using incremental decompilation
Remove snapshot plugin repo, this once used to get the snapshot version of maven-shade-plugin Add an exclusion to asm-tree to force not using it(it has been stripped by maven-shade-plugin previously)
1 parent 21adb9a commit e4464f2

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

pom.xml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
<depend.jbannos.ver>24.0.1</depend.jbannos.ver>
2222
<depend.jmh.ver>1.36</depend.jmh.ver>
2323
</properties>
24-
<pluginRepositories>
25-
<pluginRepository>
26-
<id>plugins-snapshot</id>
27-
<url>https://repository.apache.org/content/repositories/snapshots/</url>
28-
<releases><enabled>false</enabled></releases>
29-
<snapshots><enabled>true</enabled></snapshots>
30-
</pluginRepository>
31-
</pluginRepositories>
3224
<build>
3325
<plugins>
3426
<plugin>
@@ -189,6 +181,12 @@
189181
<groupId>org.ow2.asm</groupId>
190182
<artifactId>asm-commons</artifactId>
191183
<version>${depend.asm.ver}</version>
184+
<exclusions>
185+
<exclusion>
186+
<groupId>org.ow2.asm</groupId>
187+
<artifactId>asm-tree</artifactId>
188+
</exclusion>
189+
</exclusions>
192190
</dependency>
193191
<dependency>
194192
<groupId>com.google.code.gson</groupId>

src/main/java/cn/maxpixel/mcdecompiler/MinecraftDecompiler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package cn.maxpixel.mcdecompiler;
2020

2121
import cn.maxpixel.mcdecompiler.decompiler.Decompilers;
22+
import cn.maxpixel.mcdecompiler.decompiler.IDecompiler;
2223
import cn.maxpixel.mcdecompiler.decompiler.IExternalResourcesDecompiler;
2324
import cn.maxpixel.mcdecompiler.decompiler.ILibRecommendedDecompiler;
2425
import cn.maxpixel.mcdecompiler.mapping.NamespacedMapping;
@@ -112,7 +113,7 @@ public void decompile(String decompilerName, @Nullable Path incrementalJar) {
112113
if (decompiler instanceof ILibRecommendedDecompiler lrd) {
113114
ObjectSet<Path> libs = options.bundledLibs().<ObjectSet<Path>>map(ObjectOpenHashSet::new).orElseGet(() ->
114115
DownloadingUtil.downloadLibraries(options.version(), libDownloadPath));
115-
if (incrementalJar != null) {
116+
if (incrementalJar != null && decompiler.getSourceType() == IDecompiler.SourceType.DIRECTORY) {
116117
try (FileSystem incrementalFs = JarUtil.createZipFs(incrementalJar)) {
117118
var toDecompile = deobfuscator.toDecompile;
118119
ObjectOpenHashSet<String> possibleInnerClasses = new ObjectOpenHashSet<>();

0 commit comments

Comments
 (0)