Skip to content

Commit c5ce9ab

Browse files
authored
Fix fg.deobf source not loading (#746)
* Fix fg.deobf source not loading * Fix fg.deobf source not loading
1 parent 3c548f2 commit c5ce9ab

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/userdev/java/net/minecraftforge/gradle/userdev/util/DeobfuscatingRepo.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,8 @@ private File findRaw(Artifact artifact, String mapping) throws IOException {
126126
}
127127

128128
private File findSource(Artifact artifact, String mapping) throws IOException {
129-
Optional<File> orig = findArtifactFile(artifact);
130-
if (!orig.isPresent()) {
131-
return null;
132-
}
133-
134-
File origFile = orig.get();
129+
File origFile = MavenArtifactDownloader.manual(project, artifact.getDescriptor(), false);
130+
if (origFile == null) return null;
135131

136132
return deobfuscator.deobfSources(origFile, mapping, getArtifactPath(artifact, mapping));
137133
}

src/userdev/java/net/minecraftforge/gradle/userdev/util/Deobfuscator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public File deobfSources(File original, String mappings, String... cachePath) th
158158
if (!cache.isSame() || !output.exists()) {
159159
McpNames map = McpNames.load(names);
160160

161-
try (ZipInputStream zin = new ZipInputStream(new FileInputStream(input));
161+
try (ZipInputStream zin = new ZipInputStream(new FileInputStream(original));
162162
ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(output))) {
163163
ZipEntry _old;
164164
while ((_old = zin.getNextEntry()) != null) {

0 commit comments

Comments
 (0)