FlowArg / FlowUpdater

The free and open source solution to update Minecraft.
https://flowarg.github.io/FlowUpdater
GNU General Public License v3.0
97 stars 19 forks source link

BUG : No Sound, Background and Icon #20

Closed xii69 closed 1 year ago

xii69 commented 1 year ago

Describe the bug No Sound, Background and Game icon

To Reproduce Steps to reproduce the behavior:

  1. Launching minecraft using this code:

    private static void launch(String username, int memory, boolean update) throws Exception {
    if (update) {
        VanillaVersion version = new VanillaVersion.VanillaVersionBuilder()
            .withName("1.19.4")
            .build();
        FabricVersion builder = new FabricVersion.FabricVersionBuilder()
            .withFabricVersion("0.14.22")
            .withModrinthModPack(new ModrinthModPackInfo("WTNMThBB", true))
            .build();
        FlowUpdater updater = new FlowUpdater.FlowUpdaterBuilder()
            .withVanillaVersion(version)
            .withModLoaderVersion(builder)
            .build();
        updater.update(GameDirGenerator.createGameDir("neverland", true));
    }
    
    GameInfos infos = new GameInfos("neverland", new GameVersion("1.19.4", GameType.FABRIC), new GameTweak[]{});
    AuthInfos authInfos = new AuthInfos(username, "token", "uuid");
    ExternalLaunchProfile profile = MinecraftLauncher.createExternalProfile(infos, GameFolder.FLOW_UPDATER_1_19_SUP, authInfos);
    profile.getVmArgs().add(0, "-Xmx" + memory + "M");
    profile.getVmArgs().add(0, "-Xms" + memory + "M");
    ExternalLauncher launcher = new ExternalLauncher(profile);
    Process game = launcher.launch();
    }

Expected behavior The launched client should have sound and background image in the main menu

antoineok commented 1 year ago

Je dirait plutot que ca viens de l'Open Launcher Lib

antoineok commented 1 year ago

Tu as quelle version de l'open launcher lib? Celle de Litarvan, ou celle de Flow?

antoineok commented 1 year ago

et surtout, je te conseil de ne pas mettre la mise a jour dans une condition. Le jeu ne sera pas retéléchargé, mais il y aura quand meme une vérification des fichiers de mc

xii69 commented 1 year ago

Tu as quelle version de l'open launcher lib? Celle de Litarvan, ou celle de Flow?

Flow

xii69 commented 1 year ago

et surtout, je te conseil de ne pas mettre la mise a jour dans une condition. Le jeu ne sera pas retéléchargé, mais il y aura quand meme une vérification des fichiers de mc

Its a long story, I'll share a .zip file of this launcher for those people who want to use it which all assets are downloaded already

antoineok commented 1 year ago

Tu as quelle version de l'open launcher lib? Celle de Litarvan, ou celle de Flow?

Flow

Then, for the MC version you are using, i recommand you to use NoFramework instead.

antoineok commented 1 year ago

et surtout, je te conseil de ne pas mettre la mise a jour dans une condition. Le jeu ne sera pas retéléchargé, mais il y aura quand meme une vérification des fichiers de mc

Its a long story, I'll share a .zip file of this launcher for those people who want to use it which all assets are downloaded already

Even if you share a zip, the valid files won't be re downloaded, unless the checksum or the size isn't the same as the one Mojang list in the download manifest

xii69 commented 1 year ago

Still didn't understood how I can fix the missing sound and other stuff.

FlowArg commented 1 year ago

Instead of using the old GameInfos stuff etc, you can use the NoFramework class. It's easier and avoid a lot of problems to launch the game. NoFramework noFramework = new NoFramework(GameDirGenerator.createGameDir("neverland", true), authInfos, GameFolder.FLOW_UPDATER_1_19_SUP); to add your ram arguments, you can use noFramework.getAdditionalVmArgs().add and then Process process = noFramework.launch("1.19.4", "0.14.22", NoFramework.ModLoader.FABRIC);

xii69 commented 1 year ago

Thanks, should I delete the downloaded files and let the launcher download them again?

FlowArg commented 1 year ago

maybe! a clean env is always better to test these kind of things lmao

xii69 commented 1 year ago

Thanks.