Доброго времени суток.
Я пытаюсь запустить майнкрафт forge из командной строки, но у меня возникают ошибки.
Вот строка запуска:
java -XstartOnFirstThread -XX:+IgnoreUnrecognizedVMOptions --add-exports=java.base/sun.security.util=ALL-UNNAMED --add-exports=jdk.naming.dns/com.sun.jndi.dns=java.naming --add-opens=java.base/java.util.jar=ALL-UNNAMED -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -Dfml.ignoreInvalidMinecraftCertificates=true -Dorg.lwjgl.util.Debug=true -Djava.library.path=natives -Dfml.ignorePatchDiscrepancies=true -cp "minecraft.jar:libs/*" cpw.mods.modlauncher.Launcher --gameDir path --accessToken "" --userProperties {} --version 1.16.5 --username 1 --fml.forgeVersion 36.2.34 --fml.mcVersion 1.16.5 --fml.mcpVersion 20210115.111550 --launchTarget fmlclient --fml.forgeGroup net.minecraftforge --assetsDir path -fml.forgePath path -mj.authToken token
Вот ошибка:
<@399569930200023040> <@332941353862561804> <@140570281012887552> [02:49:47] [main/INFO] [STDOUT/]: [02:49:47] [main/FATAL] [ne.mi.fm.lo.LanguageLoadingProvider/CORE]: Found unversioned language provider javafml Exception in thread "main" [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.RuntimeException: Failed to find implementation version for language provider javafml [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.LanguageLoadingProvider.lambda$loadLanguageProviders$1(LanguageLoadingProvider.java:115) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.ArrayList.forEach(ArrayList.java:1257) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.LanguageLoadingProvider.loadLanguageProviders(LanguageLoadingProvider.java:103) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.LanguageLoadingProvider.<init>(LanguageLoadingProvider.java:97) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.FMLLoader.setupLaunchHandler(FMLLoader.java:203) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at net.minecraftforge.fml.loading.FMLServiceProvider.initialize(FMLServiceProvider.java:82) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServiceDecorator.onInitialize(TransformationServiceDecorator.java:68) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.lambda$initialiseTransformationServices$7(TransformationServicesHandler.java:107) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at java.util.HashMap$Values.forEach(HashMap.java:981) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.initialiseTransformationServices(TransformationServicesHandler.java:107) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:59) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.run(Launcher.java:76) [02:49:47] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1052]: at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [LWJGL] [02:49:47] [Thread-3/INFO] [STDERR/]: [org.lwjgl.system.APIUtil:apiLog:76]: Loading library: com.apple.opengl
Либы брал из тлаунчера. Тот же файл форджа и та же строка запуска на винде спокойно все запускает и загружает без ошибок.
В чем может быть проблема?
UPD:
Выведя содержимое листа languageProviders
(private final List<IModLanguageProvider> languageProviders = new ArrayList<>();
), я получил это:\
[13:27:05] [main/INFO] [STDOUT/]: [net.minecraftforge.fml.loading.LanguageLoadingProvider:loadLanguageProviders:107]: javafml
[13:27:05] [main/INFO] [STDOUT/]: [net.minecraftforge.fml.loading.LanguageLoadingProvider:loadLanguageProviders:107]: minecraft
Так же, там есть вот такой цикл:
languageProviders.forEach(lp -> { final Path lpPath; try { lpPath = Paths.get(lp.getClass().getProtectionDomain().getCodeSource().getLocation().toURI()); } catch (URISyntaxException e) { throw new RuntimeException("Huh?", e); } Optional<String> implementationVersion = JarVersionLookupHandler.getImplementationVersion(lp.getClass()); String impl = implementationVersion.orElse(Files.isDirectory(lpPath) ? FMLLoader.forgeVersion.split("\\.")[0] : null); if (impl == null) { LOGGER.fatal(CORE, "Found unversioned language provider {}", lp.name()); throw new RuntimeException("Failed to find implementation version for language provider "+ lp.name()); } LOGGER.debug(CORE, "Found language provider {}, version {}", lp.name(), impl); StartupMessageManager.modLoaderConsumer().ifPresent(c->c.accept("Loaded language provider "+lp.name()+ " " + impl)); languageProviderMap.put(lp.name(), new ModLanguageWrapper(lp, new DefaultArtifactVersion(impl))); });
lpPath выводит путь к minecraft.jar:
/Users/namelauncher/minecraft.jar
Путь к майнкрафту правильный.
Данная строчка:
FMLLoader.forgeVersion.split("\\.")[0]
Выводит "36"
Optional<String> implementationVersion = JarVersionLookupHandler.getImplementationVersion(lp.getClass());
Выводит null.