简体   繁体   中英

Minecraft Forge mod making gradlew build not working

When I run the command "gradlew build" in my mods folder it returns "BUILD SUCCESSFUL" and when i open the folder build/libs i get two files one NAME-VER.jar and one NAME-VER--sources.jar so i copied NAME-VER.jar into my minecraft mod folder and the game starts okay but in minecraft all i get is "mercuries_updater" could it be to do with build.gradle file? Info: Windows10, eclipse ide, Minecraft 1.11.2, ForgeGradle 2.2-SNAPSHOT-d13a6c8

A couple of things:

  1. You must build using gradlew build , Eclipse doesn't know about the reobfuscation task and as such, anything that Eclipse compiles (without using Gradle) will fail.

  2. The two output files in your build/libs folder are:

    1. The compiled jar file (your mod that you will distribute).
    2. The source files jar, which you do not need to do anything with. This file will not run correctly when put in the Minecraft mods folder.

I am not sure why your mod is not showing up properly when you add the jar file to the mods folder, I would need to see the Forge log from that attempt.

通过将源文件夹移动到src/main/javasrc/main/resources修复

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM