Search code examples
javaminecraftminecraft-forge

How do I bypass error of Mod not valid mod file?


I am trying to configure a mod on minecraft forge 1.16.4 and I changed the recipe of this mod linked below. I zipped the edited mod folder and renamed it to a jar file. When I booted up Minecraft again, it said it wasn't a valid mod file. What do I do?

Mod: https://www.curseforge.com/minecraft/mc-mods/morevanillaarmor

Github: https://github.com/MelanX/MoreVanillaArmor


Solution

  • Java needs to be compiled to bytecode to be ran. You can't just zip up the source files and expect it to work as a jar. Run ./gradlew build to do this the right way automatically.