mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Remove old style assets folder
This commit is contained in:
parent
cebe47939a
commit
82938fe8d4
3 changed files with 4 additions and 15 deletions
|
@ -86,7 +86,7 @@ public void invoke(String... args) throws IOException, CommandException {
|
|||
if (version.compareTo(ClientProfileVersions.MINECRAFT_1_7_10) <= 0) {
|
||||
logger.warn("Minecraft 1.7.9 and below not supported. Use at your own risk");
|
||||
}
|
||||
MakeProfileHelper.MakeProfileOption[] options = MakeProfileHelper.getMakeProfileOptionsFromDir(clientDir, version, Files.exists(server.updatesDir.resolve("assets")));
|
||||
MakeProfileHelper.MakeProfileOption[] options = MakeProfileHelper.getMakeProfileOptionsFromDir(clientDir, version);
|
||||
for (MakeProfileHelper.MakeProfileOption option : options) {
|
||||
logger.debug("Detected option {}", option.getClass().getSimpleName());
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ public String getUsageDescription() {
|
|||
public void invoke(String... args) throws Exception {
|
||||
verifyArgs(args, 3);
|
||||
ClientProfile.Version version = parseClientVersion(args[1]);
|
||||
MakeProfileHelper.MakeProfileOption[] options = MakeProfileHelper.getMakeProfileOptionsFromDir(server.updatesDir.resolve(args[2]), version, Files.exists(server.updatesDir.resolve("assets")));
|
||||
MakeProfileHelper.MakeProfileOption[] options = MakeProfileHelper.getMakeProfileOptionsFromDir(server.updatesDir.resolve(args[2]), version);
|
||||
for (MakeProfileHelper.MakeProfileOption option : options) {
|
||||
logger.info("Detected option {}", option);
|
||||
}
|
||||
|
|
|
@ -19,11 +19,7 @@ public static ClientProfile makeProfile(ClientProfile.Version version, String ti
|
|||
ClientProfileBuilder builder = new ClientProfileBuilder();
|
||||
builder.setVersion(version);
|
||||
builder.setDir(title);
|
||||
if (findOption(options, MakeProfileOptionGlobalAssets.class).isPresent()) {
|
||||
builder.setAssetDir("assets");
|
||||
} else {
|
||||
builder.setAssetDir("asset" + version.toCleanString());
|
||||
}
|
||||
builder.setAssetDir("assets");
|
||||
builder.setAssetIndex(version.toString());
|
||||
builder.setInfo("Server description");
|
||||
builder.setTitle(title);
|
||||
|
@ -209,7 +205,7 @@ private static String getLog4jVersion(Path dir) throws IOException {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static MakeProfileOption[] getMakeProfileOptionsFromDir(Path dir, ClientProfile.Version version, boolean globalAssets) throws IOException {
|
||||
public static MakeProfileOption[] getMakeProfileOptionsFromDir(Path dir, ClientProfile.Version version) throws IOException {
|
||||
List<MakeProfileOption> options = new ArrayList<>(2);
|
||||
if (Files.exists(dir.resolve("forge.jar"))) {
|
||||
options.add(new MakeProfileOptionForge());
|
||||
|
@ -247,9 +243,6 @@ public static MakeProfileOption[] getMakeProfileOptionsFromDir(Path dir, ClientP
|
|||
if (Files.exists(dir.resolve("libraries/forge/launchwrapper-1.12-launcherfixed.jar.jar")) || Files.exists(dir.resolve("libraries/net/minecraft/launchwrapper"))) {
|
||||
options.add(new MakeProfileOptionLaunchWrapper());
|
||||
}
|
||||
if (globalAssets) {
|
||||
options.add(new MakeProfileOptionGlobalAssets());
|
||||
}
|
||||
return options.toArray(new MakeProfileOption[0]);
|
||||
}
|
||||
|
||||
|
@ -325,10 +318,6 @@ public static class MakeProfileOptionLaunchWrapper implements MakeProfileOption
|
|||
|
||||
}
|
||||
|
||||
public static class MakeProfileOptionGlobalAssets implements MakeProfileOption {
|
||||
|
||||
}
|
||||
|
||||
public static class MakeProfileOptionFabric implements MakeProfileOption {
|
||||
public String jimfsPath;
|
||||
public String guavaPath;
|
||||
|
|
Loading…
Reference in a new issue