Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit fabf2af

Browse files
authored
Merge pull request #8 from GTNewHorizons/rfg-mapping-path
Add GradleStart-injected property for obf mapping discovery
2 parents 9b42fa7 + f6102d5 commit fabf2af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/codechicken/lib/asm/ObfMapping.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static File[] getConfFiles() {
110110
throw new RuntimeException("Failed to select mappings directory, set it manually in the config");
111111
}
112112

113-
private static final int DIR_GUESSES = 5;
113+
private static final int DIR_GUESSES = 6;
114114
private static final int DIR_ASKS = 3;
115115

116116
public static File confDirectoryGuess(int i, ConfigTag tag) {
@@ -132,6 +132,9 @@ public static File confDirectoryGuess(int i, ConfigTag tag) {
132132
System.getProperty("user.home"),
133133
".gradle/caches/minecraft/net/minecraftforge/forge/" + FMLInjectionData.data()[4] + "-"
134134
+ ForgeVersion.getVersion() + "-" + FMLInjectionData.data()[4] + "/unpacked/conf");
135+
case 5:
136+
final String gradleCsvDir = System.getProperty("net.minecraftforge.gradle.GradleStart.csvDir");
137+
return gradleCsvDir != null ? new File(gradleCsvDir) : null;
135138
default:
136139
JFileChooser fc = new JFileChooser(mcDir);
137140
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);

0 commit comments

Comments
 (0)