Show furnace icon when the game is patched
This commit is contained in:
@@ -158,7 +158,8 @@ public class HMCLGameRepository extends DefaultGameRepository {
|
|||||||
File iconFile = getVersionIconFile(id);
|
File iconFile = getVersionIconFile(id);
|
||||||
if (iconFile.exists())
|
if (iconFile.exists())
|
||||||
return new Image("file:" + iconFile.getAbsolutePath());
|
return new Image("file:" + iconFile.getAbsolutePath());
|
||||||
else if (version.getMainClass() != null &&
|
else if (!version.getPatches().isEmpty() ||
|
||||||
|
version.getMainClass() != null &&
|
||||||
("net.minecraft.launchwrapper.Launch".equals(version.getMainClass())
|
("net.minecraft.launchwrapper.Launch".equals(version.getMainClass())
|
||||||
|| version.getMainClass().startsWith("net.fabricmc")
|
|| version.getMainClass().startsWith("net.fabricmc")
|
||||||
|| "cpw.mods.modlauncher.Launcher".equals(version.getMainClass())))
|
|| "cpw.mods.modlauncher.Launcher".equals(version.getMainClass())))
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class GameItem extends Control {
|
|||||||
this.version = id;
|
this.version = id;
|
||||||
|
|
||||||
// GameVersion.minecraftVersion() is a time-costing job (up to ~200 ms)
|
// GameVersion.minecraftVersion() is a time-costing job (up to ~200 ms)
|
||||||
CompletableFuture.supplyAsync(() -> GameVersion.minecraftVersion(profile.getRepository().getVersionJar(id)).orElse("Unknown"), POOL_VERSION_RESOLVE)
|
CompletableFuture.supplyAsync(() -> GameVersion.minecraftVersion(profile.getRepository().getVersionJar(id)).orElse(i18n("message.unknown")), POOL_VERSION_RESOLVE)
|
||||||
.thenAcceptAsync(game -> {
|
.thenAcceptAsync(game -> {
|
||||||
StringBuilder libraries = new StringBuilder(game);
|
StringBuilder libraries = new StringBuilder(game);
|
||||||
LibraryAnalyzer analyzer = LibraryAnalyzer.analyze(profile.getRepository().getVersion(id));
|
LibraryAnalyzer analyzer = LibraryAnalyzer.analyze(profile.getRepository().getVersion(id));
|
||||||
|
|||||||
Reference in New Issue
Block a user