44 */
55package net .minecraftforge .mcmaven .impl .util ;
66
7+ import java .util .Map ;
8+
79import net .minecraftforge .srgutils .MinecraftVersion ;
810
911/*
@@ -19,6 +21,26 @@ public static Artifact fixLegacyTools(Artifact artifact) {
1921 if ("net.minecraftforge" .equals (artifact .getGroup ()) && "mergetool" .equals (artifact .getName ()) && "0.2.3.2" .equals (artifact .getVersion ()))
2022 return artifact .withVersion ("0.2.3.3" );
2123 return artifact ;
24+
25+ // scala did some releases overwriting their own files, so we host them ourselves, but
26+ }
27+
28+ private static Map <String , String > FORGE_FIXES = Map .of (
29+ // They changed the hashes for a while, then changed them back
30+ "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2_mc" , "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2" ,
31+ "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2_mc" , "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2" ,
32+ // They moved then from root to modules
33+ "org.scala-lang:scala-swing_2.11:1.0.1" , "org.scala-lang.modules:scala-swing_2.11:1.0.1" ,
34+ "org.scala-lang:scala-xml_2.11:1.0.2" , "org.scala-lang.modules:scala-xml_2.11:1.0.2" ,
35+ "org.scala-lang:scala-parser-combinators_2.11:1.0.1" , "org.scala-lang.modules:scala-parser-combinators_2.11:1.0.1"
36+ );
37+
38+ public static Artifact fixLegacyForgeDeps (Artifact artifact ) {
39+ // scala did some releases overwriting their own files, so we host them ourselves because of the hashes, but during dev it should be fine to just use the official
40+ var newCoords = FORGE_FIXES .get (artifact .toString ());
41+ if (newCoords != null )
42+ return Artifact .from (newCoords );
43+ return artifact ;
2244 }
2345
2446 private static final MinecraftVersion MC_1_12_2 = MinecraftVersion .from ("1.12.2" );
0 commit comments