Why are my forge mod exports titled incorrectly and don't show up in minecraft forge's mods tab?
NickName:Ashwin Gupta Ask DateTime:2015-12-20T04:43:19

Why are my forge mod exports titled incorrectly and don't show up in minecraft forge's mods tab?

So I just started using Forge. I just have a very simple example mod for learning purposes. When I export the mod using gradlew build, everything works fine, it puts the mod into the build\libs folder of forge. However, the name of the file is modid-1.0. Now I am pretty sure I named the mod differently in my mcmod.info file. Why is it doing this and how can I change it? Furthermore, even though the mod runs correctly,(the minecraft launcher console prints the statement) but when I click on the mods tab in the mainmenu of minecraft my mod doesn't show up.

Also, another problem, its actually generating two files into build\libs. One called modid-1.0 and another called modid-1.0-sources. Which one do I want to use ( meaning which one do I put into the .minecraft/mods folder)

My mcmod.info file

[
{
  "modid": "myexamplemod",
  "name": "Example Mod",
  "description": "Example placeholder mod.",
  "version": "1.0",
  "mcversion": "1.8.8",
  "url": "",
  "updateUrl": "",
  "authorList": ["ExampleDude"],
  "credits": "The Forge and FML guys, for making this example",
  "logoFile": "",
  "screenshots": [],
  "dependencies": []
}
]

Mod Source Code:

package com.example.examplemod;

import net.minecraft.init.Blocks;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
    public static final String MODID = "myexamplemod";
    public static final String VERSION = "1.0";

    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        // some example code
        //while(true) {
        for(int x = 0; x < 100; x++) {
        System.out.println("My Mod Says: DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());
        }
        //}
    }
    @EventHandler
    public static void postInit(FMLPostInitializationEvent event) {
        //while(true) {
            System.out.println("DIRT BLOCK >> "+Blocks.dirt.getUnlocalizedName());
            //}
    }
}

I know for testing purposes I can run it using the console command gradlew runClient, but I want to be able to do it the normal way for users where I can place a jar file into the mods folder of minecraft and have the mod run.

Copyright Notice:Content Author:「Ashwin Gupta」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/34375204/why-are-my-forge-mod-exports-titled-incorrectly-and-dont-show-up-in-minecraft-f

More about “Why are my forge mod exports titled incorrectly and don't show up in minecraft forge's mods tab?” related questions

Why are my forge mod exports titled incorrectly and don't show up in minecraft forge's mods tab?

So I just started using Forge. I just have a very simple example mod for learning purposes. When I export the mod using gradlew build, everything works fine, it puts the mod into the build\libs fol...

Show Detail

Why is my minecraft forge mod not working?

I am trying to make a custom biome, but it crashes when I try to export the mod and load it in Minecraft. It works fine in eclipse 'run client' mode. Here is the code: package com.dadobug1111.

Show Detail

How to add another sourceSet with a mod in Minecraft Forge (Forge Gradle 3)?

I have a library made in Forge dev environment, one is in the main source set, containing library code; another is in the testmod (or any other name) source set, containing testing code that needs ...

Show Detail

Create a Multiplayer Minecraft server and allow my Mod to be used in Minecraft Forge

I made a Mod where I created my custom Blocks and commands and now I have it ready. I was able to use it in Single Player in Minecraft by installing my Mod. But What I want to do is to create a

Show Detail

How to implement custom capes for minecraft 1.16.4 forge mod

So I need help. I want to make cape system for my forge mod e.g. custom capes for developers, donators, etc. I don't know how to do it or even if this is possible. If it's possible please tell me h...

Show Detail

Minecraft Forge mod - log in as player in development enviroment

I am developing a Minecraft mod with Forge, and I need to test it on a server. How do I log in with my Minecraft account so that I can join a server? The IDE I am using is Eclipse, and the workspac...

Show Detail

Forge 1.16.5 Mod works in IDE but JAR file crashed game

I'm currently trying to modify an already existing mod, and everything works as intended in the IDE (IntelliJ Idea Community). But when I export the jar (via gradle task), it crashes my client and ...

Show Detail

Minecraft forge mod compiling error

I have made a mod and now i want to compile it i followed a tutorial and tried to compile however i have an error. Please tell me what i did wrong. Thank you. Terminal: * Where: Build file '/User...

Show Detail

The gradle error on Build forge 1.8.9 mod

i used gradle to build my forge mod but i got these error * Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'net.minecraftforge.gradle.forge', artifact: 'com.github.asbyth:

Show Detail

Implementing Baritone API into a Minecraft Forge mod

I'm currently making a 1.12.2 Forge mod that involves pathfinding, so I decided to use Baritone. Can anyone help me with actually accessing the API? What I'm currently doing is manually accessing i...

Show Detail