Compare commits

..

No commits in common. "d4ca612bff5fc1752f1bda18c8d0b80d81bef543" and "60f742b3efa335166fc1324eeaa9a938c939ecb0" have entirely different histories.

5 changed files with 2 additions and 58 deletions

View file

@ -174,7 +174,7 @@ public static class ProguardConf {
"-libraryjars '<java.home>/lib/ext/nashorn.jar'",
"-libraryjars '<java.home>/lib/ext/jfxrt.jar'"
};
private static final char[] chars = "1aAbBcC2dDeEfF3gGhHiI4jJkKlL5mMnNoO6pPqQrR7sStT8uUvV9wWxX0yYzZ".toCharArray();
private static final char[] chars = "1aAbBcC2dDeEfF3gGhHiI4jJkKl5mMnNoO6pPqQrR7sStT8uUvV9wWxX0yYzZ".toCharArray();
public final Path proguard;
public final Path config;
public final Path mappings;

View file

@ -158,7 +158,7 @@ private Result modernPing(HInput input, HOutput output, int protocol) throws IOE
if (statusPacketID != 0x0)
throw new IOException("Illegal status packet ID: " + statusPacketID);
response = packetInput.readString(PACKET_LENGTH);
LogHelper.dev("Ping response (modern): '%s'", response);
LogHelper.debug("Ping response (modern): '%s'", response);
}
// Parse JSON response

View file

@ -254,12 +254,6 @@ public void updateOptionalGraph() {
file.conflict[i] = getOptionalFile(file.conflictFile[i].name);
}
}
if(file.groupFile != null) {
file.group = new OptionalFile[file.groupFile.length];
for(int i = 0; i < file.groupFile.length; ++i) {
file.group[i] = getOptionalFile(file.groupFile[i].name);
}
}
}
}
@ -375,11 +369,6 @@ public void verify() {
if (s == null)
throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.dependenciesFile", f.name));
}
if(f.groupFile != null)
for (OptionalDepend s : f.groupFile) {
if (s == null)
throw new IllegalArgumentException(String.format("Found null entry in updateOptional.%s.groupFile", f.name));
}
if (f.triggersList != null) {
for (OptionalTrigger trigger : f.triggersList) {
if (trigger == null)

View file

@ -24,14 +24,10 @@ public class OptionalFile {
@LauncherNetworkAPI
public OptionalDepend[] conflictFile;
@LauncherNetworkAPI
public OptionalDepend[] groupFile;
@LauncherNetworkAPI
public transient OptionalFile[] dependencies;
@LauncherNetworkAPI
public transient OptionalFile[] conflict;
@LauncherNetworkAPI
public transient OptionalFile[] group;
@LauncherNetworkAPI
public int subTreeLevel = 1;
@LauncherNetworkAPI
public boolean isPreset;

View file

@ -7,9 +7,7 @@
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.Arrays;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;
public class OptionalView {
public Set<OptionalFile> enabled = new HashSet<>();
@ -27,7 +25,6 @@ public OptionalView(OptionalView view) {
this.enabled = new HashSet<>(view.enabled);
this.installInfo = new HashMap<>(view.installInfo);
this.all = view.all;
fixDependencies();
}
public OptionalView(ClientProfile profile, OptionalView old) {
@ -43,7 +40,6 @@ public OptionalView(ClientProfile profile, OptionalView old) {
disable(newFile, (file, status) -> {});
}
}
fixDependencies();
}
@SuppressWarnings("unchecked")
@ -84,33 +80,6 @@ public Set<OptionalAction> getEnabledActions() {
return results;
}
//Needed if dependency/conflict was added after mod declaring it and clients have their profiles with this mod enabled
public void fixDependencies() {
Set<OptionalFile> disabled = all.stream().filter(t -> !isEnabled(t)).collect(Collectors.toSet());
for (OptionalFile file : disabled) {
if (file.group != null && Arrays.stream(file.group).noneMatch(this::isEnabled)) {
enable(file.group[0], false, null);
}
}
for (OptionalFile file : enabled) {
if (file.dependencies != null) {
for (OptionalFile dep : file.dependencies) {
enable(dep, false, null);
}
}
if (file.conflict != null) {
for (OptionalFile conflict : file.conflict) {
disable(conflict, null);
}
}
if (file.group != null) {
for (OptionalFile member : file.group) {
disable(member, null);
}
}
}
}
public Set<OptionalAction> getDisabledActions() {
Set<OptionalAction> results = new HashSet<>();
for (OptionalFile e : all) {
@ -142,11 +111,6 @@ public void enable(OptionalFile file, boolean manual, BiConsumer<OptionalFile, B
disable(conflict, callback);
}
}
if(file.group != null) {
for(OptionalFile member : file.group) {
disable(member, callback);
}
}
}
public void disable(OptionalFile file, BiConsumer<OptionalFile, Boolean> callback) {
@ -165,11 +129,6 @@ public void disable(OptionalFile file, BiConsumer<OptionalFile, Boolean> callbac
}
}
}
if (file.group != null && file.group.length != 0) {
if (Arrays.stream(file.group).noneMatch(this::isEnabled)) {
enable(file.group[0], false, callback);
}
}
}
private boolean contains(OptionalFile file, OptionalFile[] array) {