mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 09:07:48 -04:00
[Version Json processor] Allow override library version
This commit is contained in:
parent
dc8671bb54
commit
b301e3c88a
@ -507,8 +507,15 @@ public final class Tools
|
||||
List<DependentLibrary> libList = new ArrayList<DependentLibrary>(Arrays.asList(inheritsVer.libraries));
|
||||
try {
|
||||
for (DependentLibrary lib : customVer.libraries) {
|
||||
if (lib.clientreq || !lib.serverreq) {
|
||||
libList.add(lib);
|
||||
String libName = lib.name.substring(0, lib.name.lastIndexOf(":"));
|
||||
for (int i = 0; i < libList.size(); i++) {
|
||||
DependentLibrary libAdded = libList.get(i);
|
||||
String libAddedName = libAdded.name.substring(0, libAdded.name.lastIndexOf(":"));
|
||||
if (libAddedName.equals(libName)) {
|
||||
libList.set(i, lib);
|
||||
} else {
|
||||
libList.add(lib);
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
@ -5,9 +5,6 @@ public class DependentLibrary {
|
||||
public LibraryDownloads downloads;
|
||||
public String url;
|
||||
|
||||
// Forge specific params
|
||||
public boolean clientreq, serverreq;
|
||||
|
||||
public static class LibraryDownloads
|
||||
{
|
||||
public MinecraftLibraryArtifact artifact;
|
||||
|
Loading…
x
Reference in New Issue
Block a user