Skip to content

Commit c81000f

Browse files
committed
Hacky fix for 1.12.2 Side annottion issue
1 parent b521e3a commit c81000f

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/common/java/net/minecraftforge/gradle/common/config/MCPConfigV1.java

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import java.io.ByteArrayInputStream;
1717
import java.io.InputStream;
1818
import java.lang.reflect.Type;
19+
import java.util.ArrayList;
1920
import java.util.Collections;
2021
import java.util.List;
2122
import java.util.Map;
@@ -82,7 +83,14 @@ public Map<String, Function> getFunctions() {
8283

8384
public List<String> getLibraries(String side) {
8485
List<String> ret = libraries == null ? null : libraries.get(side);
85-
return ret == null ? Collections.emptyList() : ret;
86+
if (ret == null)
87+
return Collections.emptyList();
88+
89+
if (!(ret instanceof ArrayList))
90+
ret = new ArrayList<>(ret); // Make mutable
91+
for (int x = 0; x < ret.size(); x++)
92+
ret.set(x, hackyFixDependecy(ret.get(x)));
93+
return ret;
8694
}
8795

8896
public static class Step {
@@ -142,7 +150,7 @@ public static class Function {
142150
private Integer java_version;
143151

144152
public String getVersion() {
145-
return version;
153+
return hackyFixDependecy(version);
146154
}
147155
public void setVersion(String value) {
148156
this.version = value;
@@ -177,4 +185,11 @@ public void setJavaVersion(Integer javaVersion) {
177185
this.java_version = javaVersion;
178186
}
179187
}
188+
189+
private static String hackyFixDependecy(String artifact) {
190+
// Hacky fix to use version without BUKKIT Side
191+
if (artifact.startsWith("net.minecraftforge:mergetool:0.2.3.2"))
192+
return artifact.replace("0.2.3.2", "0.2.3.3");
193+
return artifact;
194+
}
180195
}

0 commit comments

Comments
 (0)