Hour 2; Update the mcmod.info file?

106 views
Skip to first unread message

Richard S

unread,
Jan 1, 2015, 2:57:50 AM1/1/15
to sams-teach-yourself-minecraf...@googlegroups.com
My custom mod file, as called for on page 34, is called TeachRichMod.  It is nearly identical to the ExampleMod in Listing 2.1.  No error messages appear for my mod in the Eclipse middle window.  When the Run Client is clicked, part of the Console text is as follows:

[MinecraftForge]: Completed early MinecraftForge initialization
[23:36:00] [Client thread/INFO] [FML]: Searching C:\Programming\Forge\eclipse\mods for mods
[23:36:00] [Client thread/INFO] [TeachRichMod]: Mod TeachRichMod is missing the required element 'name'. Substituting TeachRichMod
[23:36:02] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[23:36:03] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, examplemod, TeachRichMod] at CLIENT
[23:36:03] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, examplemod, TeachRichMod] at SERVER
[23:36:03] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Example Mod, FMLFileResourcePack:TeachRichMod
[23:36:03] [Client thread/INFO] [FML]: Processing ObjectHolder annotations

Later on in the Console listing, "DIRT BLOCK" (from ExampleMod) and "Cobblestone Block" (from TeachRichMod) are shown.

The resource file, "mcmod.info" only contains reference to ExampleMod.  In Minecraft, the text at the lower left says 5 mods are loaded and active.  Before my mod was created, Minecraft reported only 4 Mods.  When i click on the Mods bar, the listed mods are Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, and Example Mod. My mod does not show up in the list.

Should i be able to see my mod listed in the Mods list in Minecraft?  Does the text in lines 3 and 4 of the Console listing shown above indicate an error i can fix?  Does the "mcmod.info" file need to be modified?

Thank you for your time,
Richard

Richard S

unread,
Jan 1, 2015, 1:06:39 PM1/1/15
to sams-teach-yourself-minecraf...@googlegroups.com
Okay, i am a bad boy.  I am using JDK 8 instead of 7!  Is there any hope for me, or do i need to start over at page 9? I currently have JRE1.8.0_25 running. Can i keep that?
Thank you.

Jimmy Koene

unread,
Jan 3, 2015, 7:08:44 AM1/3/15
to sams-teach-yourself-minecraf...@googlegroups.com
Hey,

Recently I've heard people telling me that Java 8 works with forge as well now so that shouldn't be the problem. 

Your problem is very weird. If I understand it correctly, it works perfectly, but it doesn't show up in the list of mods. I've never had or seen this problem myself so I'm not sure on how to fix it. Are you sure your modid is different from the example mod?

- Jimmy Koene

Richard S

unread,
Jan 3, 2015, 11:23:45 AM1/3/15
to sams-teach-yourself-minecraf...@googlegroups.com
Jimmy,
Thanks for responding.  As far as i know, my modid is different.  My code follows:

package com.whitewolfvisions.teachrichmod;

import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;

@Mod(modid = TeachRichMod.MODID, version = TeachRichMod.VERSION)
public class TeachRichMod 
{
public static final String MODID = "teachrichmod";
    public static final String VERSION = "1.01";
 
    
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
// comments like this are not executed
        System.out.println("Cobblestone Block >> "+Blocks.cobblestone.getUnlocalizedName());
    }
}

If you have an epiphany on this please share it with me.  If i can't get my future mods (in this book) to show up, i will be up a creek without a paddle.
Regards,
Richard

Richard S

unread,
Jan 3, 2015, 11:28:02 AM1/3/15
to sams-teach-yourself-minecraf...@googlegroups.com
Jimmy,
Note the console message in line three (following) that says my mod is missing the required element 'name'.  Is this a clue?

[MinecraftForge]: Completed early MinecraftForge initialization
[23:36:00] [Client thread/INFO] [FML]: Searching C:\Programming\Forge\eclipse\mods for mods
[23:36:00] [Client thread/INFO] [TeachRichMod]: Mod TeachRichMod is missing the required element 'name'. Substituting TeachRichMod
[23:36:02] [Client thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load

Richard

Jimmy Koene

unread,
Jan 6, 2015, 1:36:38 PM1/6/15
to sams-teach-yourself-minecraf...@googlegroups.com
Richard,

That actually makes it even more confusing, because that means Forge knows that the mod exists and the @Mod line runs properly. The thing with this is that you could add a name element to the @Mod line which you could set to something different than the mod id. According to the log, it's being substituted by the modid which is exactly what should happen.

This is honestly the weirdest error I've ever seen. It seems to work perfectly. It even shows up in the Forge Mod Loader identified mods. I'm afraid I can't really help you with this one. The best thing I think you could try is to just make a basic Block or Item and see if that shows up in the game. If it does, there isn't really a big problem.

- Jimmy

Richard S

unread,
Jan 7, 2015, 1:06:27 AM1/7/15
to sams-teach-yourself-minecraf...@googlegroups.com
Jimmy,
Thanks much for your time responding to my queries.  I will continue in the book and see what happens.  Eventually, I hope, I will get a clue as to what I need to do different.  In the meantime I will follow your suggestion.
Sincerely,
Richard

J.Mayfield

unread,
May 8, 2015, 12:02:31 PM5/8/15
to sams-teach-yourself-minecraf...@googlegroups.com
I also had this problem. My init method would not run.

I fixed the problem by adding an @EventHander above the init method.

Originally my code loked like this and would not run.

// Init : Recipes for mod items go here
public void init(FMLInitializationEvent event)

{

    System.out.println("FIDDLE STICKS BLOCK >> "+Blocks.sandstone.getUnlocalizedName());

}

        


Now my code lokes like this and will run.

@EventHandler

// Init : Recipes for mod items go here
public void init(FMLInitializationEvent event)

{

    System.out.println("FIDDLE STICKS BLOCK >> "+Blocks.sandstone.getUnlocalizedName());

}



Reply all
Reply to author
Forward
0 new messages