|
16 | 16 | import java.io.ByteArrayInputStream; |
17 | 17 | import java.io.InputStream; |
18 | 18 | import java.lang.reflect.Type; |
| 19 | +import java.util.ArrayList; |
19 | 20 | import java.util.Collections; |
20 | 21 | import java.util.List; |
21 | 22 | import java.util.Map; |
@@ -82,7 +83,14 @@ public Map<String, Function> getFunctions() { |
82 | 83 |
|
83 | 84 | public List<String> getLibraries(String side) { |
84 | 85 | 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; |
86 | 94 | } |
87 | 95 |
|
88 | 96 | public static class Step { |
@@ -142,7 +150,7 @@ public static class Function { |
142 | 150 | private Integer java_version; |
143 | 151 |
|
144 | 152 | public String getVersion() { |
145 | | - return version; |
| 153 | + return hackyFixDependecy(version); |
146 | 154 | } |
147 | 155 | public void setVersion(String value) { |
148 | 156 | this.version = value; |
@@ -177,4 +185,11 @@ public void setJavaVersion(Integer javaVersion) { |
177 | 185 | this.java_version = javaVersion; |
178 | 186 | } |
179 | 187 | } |
| 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 | + } |
180 | 195 | } |
0 commit comments