Foreground text fill auto detected
This commit is contained in:
@@ -63,7 +63,7 @@ public final class CompatibilityRule {
|
||||
}
|
||||
|
||||
public static boolean appliesToCurrentEnvironment(Collection<CompatibilityRule> rules, Map<String, Boolean> features) {
|
||||
if (rules == null)
|
||||
if (rules == null || rules.isEmpty())
|
||||
return true;
|
||||
|
||||
Action action = Action.DISALLOW;
|
||||
|
||||
@@ -208,7 +208,8 @@ public class DefaultGameRepository implements GameRepository {
|
||||
try {
|
||||
Version resolved = version.resolve(provider);
|
||||
|
||||
if (EventBus.EVENT_BUS.fireEvent(new LoadedOneVersionEvent(this, resolved)) != Event.Result.DENY)
|
||||
if (resolved.appliesToCurrentEnvironment() &&
|
||||
EventBus.EVENT_BUS.fireEvent(new LoadedOneVersionEvent(this, resolved)) != Event.Result.DENY)
|
||||
versions.put(version.getId(), version);
|
||||
} catch (VersionNotFoundException e) {
|
||||
Logging.LOG.log(Level.WARNING, "Ignoring version {0} because it inherits from a nonexistent version.", version.getId());
|
||||
|
||||
@@ -154,7 +154,7 @@ public class Version implements Comparable<Version>, Validation {
|
||||
* Resolve given version
|
||||
*/
|
||||
public Version resolve(VersionProvider provider) throws VersionNotFoundException {
|
||||
return resolve(provider, new HashSet<>()).setResolved(true);
|
||||
return resolve(provider, new HashSet<>()).setResolved();
|
||||
}
|
||||
|
||||
protected Version resolve(VersionProvider provider, Set<String> resolvedSoFar) throws VersionNotFoundException {
|
||||
@@ -189,8 +189,8 @@ public class Version implements Comparable<Version>, Validation {
|
||||
Math.max(minimumLauncherVersion, parent.minimumLauncherVersion));
|
||||
}
|
||||
|
||||
public Version setResolved(boolean resolved) {
|
||||
return new Version(resolved, id, minecraftArguments, arguments, mainClass, inheritsFrom, jar, assetIndex, assets, libraries, compatibilityRules, downloads, logging, type, time, releaseTime, minimumLauncherVersion);
|
||||
private Version setResolved() {
|
||||
return new Version(true, id, minecraftArguments, arguments, mainClass, inheritsFrom, jar, assetIndex, assets, libraries, compatibilityRules, downloads, logging, type, time, releaseTime, minimumLauncherVersion);
|
||||
}
|
||||
|
||||
public Version setId(String id) {
|
||||
|
||||
Reference in New Issue
Block a user