Issues trying to mod minecraft 1.12.2 with forge. Cannot wrap and test build

那年仲夏 提交于 2020-05-28 06:06:21

问题


I cannot get a test build to run at all from eclipse. I am running on windows 10 with java openjdk version "1.8.0_242"

I've followed various tutorials step-by-step, but keep getting this error. I've also tried running a fresh build that I haven't edited at all and it seems to crash with the same issue.

Latest crash log.

[13:36:53] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/nebbu/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[13:36:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[13:36:53] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[13:36:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[13:36:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[13:36:53] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading
[13:36:53] [main/INFO] [FML]: Java is OpenJDK 64-Bit Server VM, version 1.8.0_242, running on Windows 10:amd64:10.0, installed at C:\Program Files\AdoptOpenJDK\jdk-8.0.242.08-hotspot\jre
[13:36:53] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory.
[13:36:53] [main/ERROR] [FML]: Full: C:\Users\nebbu\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar
[13:36:53] [main/ERROR] [FML]: Trimmed: c:/users/nebbu/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/
[13:36:53] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[13:36:53] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs.
[13:36:54] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[13:36:54] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[13:36:54] [main/INFO] [FML]: Searching C:\Users\nebbu\Desktop\Minecraft Modding\TutorialMod\run\.\mods for mods
[13:36:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[13:36:54] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[13:36:54] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[13:36:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:36:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[13:36:54] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[13:36:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:36:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[13:36:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[13:36:54] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[13:36:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[13:36:54] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[13:36:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[13:36:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[13:36:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[13:36:55] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[13:36:55] [main/ERROR] [LaunchWrapper]: Unable to launch
java.lang.reflect.InvocationTargetException: null
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_242]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_242]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_242]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_242]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
Caused by: java.lang.ExceptionInInitializerError
    at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:3158) ~[Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:42) ~[Main.class:?]
    ... 12 more
Caused by: java.lang.NullPointerException
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1847) ~[?:1.8.0_242]
    at java.lang.Runtime.loadLibrary0(Runtime.java:871) ~[?:1.8.0_242]
    at java.lang.System.loadLibrary(System.java:1124) ~[?:1.8.0_242]
    at org.lwjgl.Sys$1.run(Sys.java:72) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_242]
    at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
    at org.lwjgl.Sys.loadLibrary(Sys.java:87) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
    at org.lwjgl.Sys.<clinit>(Sys.java:117) ~[lwjgl-2.9.4-nightly-20150209.jar:?]
    at net.minecraft.client.Minecraft.getSystemTime(Minecraft.java:3158) ~[Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:42) ~[Main.class:?]
    ... 12 more
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]: java.lang.reflect.InvocationTargetException
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at java.lang.reflect.Method.invoke(Method.java:498)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1052]:    at GradleStart.main(GradleStart.java:25)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]: Caused by: net.minecraftforge.fml.relauncher.FMLSecurityManager$ExitTrappedException
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:49)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    at java.lang.SecurityManager.checkExit(SecurityManager.java:761)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    at java.lang.Runtime.exit(Runtime.java:108)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    at java.lang.System.exit(System.java:973)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    at net.minecraft.launchwrapper.Launch.launch(Launch.java:138)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[13:36:55] [main/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:1061]:    ... 6 more

my build.gradle

    repositories {
        jcenter()
        maven { url = "http://files.minecraftforge.net/maven" }
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
    }
}
apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "1.0"
group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"

sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
compileJava {
    sourceCompatibility = targetCompatibility = '1.8'
}

minecraft {
    version = "1.12.2-14.23.5.2768"
    runDir = "run"

    // the mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   snapshot are built nightly.
    // stable_#            stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20171003"
    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
}

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"

    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
    // except that these dependencies get remapped to your current MCP mappings
    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html

}

processResources {
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.version

    // replace stuff in mcmod.info, nothing else
    from(sourceSets.main.resources.srcDirs) {
        include 'mcmod.info'

        // replace version and mcversion
        expand 'version':project.version, 'mcversion':project.minecraft.version
    }

    // copy everything else except the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}

Any help is much appreciated


回答1:


This looks like a certain compatibility issue with Java 8u242 that hasn't yet been resolved. For now, the best workaround is to downgrade to Java 8u232.



来源:https://stackoverflow.com/questions/60346062/issues-trying-to-mod-minecraft-1-12-2-with-forge-cannot-wrap-and-test-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!