mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-25 18:09:27 +00:00
修复低版本启动问题
This commit is contained in:
@@ -55,7 +55,7 @@ public interface Revision {
|
||||
|
||||
@Override
|
||||
public boolean matches(MinecraftVersion min, MinecraftVersion max) {
|
||||
return this.minVersion.isAtOrBelow(max);
|
||||
return this.minVersion.isAtOrBelow(max) && min.isBelow(this.minVersion);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -251,8 +251,11 @@ public class Config {
|
||||
resource_pack$override_uniform_font = config.getBoolean("resource-pack.override-uniform-font", false);
|
||||
resource_pack$generate_mod_assets = config.getBoolean("resource-pack.generate-mod-assets", false);
|
||||
resource_pack$remove_tinted_leaves_particle = config.getBoolean("resource-pack.remove-tinted-leaves-particle", true);
|
||||
resource_pack$supported_version$min = getVersion(config.get("resource-pack.supported-version.min", "1.20").toString());
|
||||
resource_pack$supported_version$min = getVersion(config.get("resource-pack.supported-version.min", "SERVER").toString());
|
||||
resource_pack$supported_version$max = getVersion(config.get("resource-pack.supported-version.max", "LATEST").toString());
|
||||
if (resource_pack$supported_version$min.isAbove(resource_pack$supported_version$max)) {
|
||||
resource_pack$supported_version$min = resource_pack$supported_version$max;
|
||||
}
|
||||
resource_pack$merge_external_folders = config.getStringList("resource-pack.merge-external-folders");
|
||||
resource_pack$merge_external_zips = config.getStringList("resource-pack.merge-external-zip-files");
|
||||
resource_pack$exclude_file_extensions = new HashSet<>(config.getStringList("resource-pack.exclude-file-extensions"));
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ReflectionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
public static Field getDeclaredField(@NotNull Class<?> clazz, @NotNull String... possibleNames) {
|
||||
List<String> possibleNameList = Arrays.asList(possibleNames);
|
||||
for (Field field : clazz.getDeclaredFields()) {
|
||||
@@ -82,7 +82,7 @@ public class ReflectionUtils {
|
||||
return field;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("Class " + clazz.getName() + " does not contain a field with possible names " + Arrays.toString(possibleNames));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user