1

ModLoader error help?

Bob1Nilly 2/3/13 5:40 pm
250
2/4/2013 10:05 pm
I just started work on a new mod, going by the tutorials on the minecraft wiki. Everything went fine, work first time. But when I started with the 'creating your first mod' section, where you are instructed to create a mod.myMod.java class, I got an error. The tutorial said it would be fixed later, so I kept going. But at the point where the tutorial said the error would be fixed, it didn't. I tried directly copy and pasting the coding of the wiki, no success. Please help me fix this.

The error: 'BaseMod could not be resolved to a type'
(the error is on line 3)
The code:
package net.minecraft.src;

public class mod_myMod extends BaseMod
{
public void load() {}

public String getVersion()
{
return "Verion 1.0";
}
}





Thanks!
Posted by
Bob1Nilly
Level 1 : New Miner
0

  Have something to say?

JoinSign in

6

brianblokster
02/04/2013 12:45 pm
Level 43 : Master Nerd
Hmm, looks like you forgot to import. I fixed the code, it should work:

package net.minecraft.src;

import java.util.Random;

public class mod_MyMod extends BaseMod
{

public void load()
{

}
public String getVersion()
{
return "Version 1.0";
}
}
1
IAmChosen
02/04/2013 1:11 pm
Level 36 : Artisan Modder
Why would he need to import the random class? He isn't using it. Also, the error has nothing to do with imports.

Go through these steps:

Make sure Basemod exists at all. If it doesn't, that means you didn't compile minecraft with Modloader installed.

Make sure you spelled Basemod right. Remember, it's case sensitive. It could be that the M isn't capitalized.

If you're actually using forge, you need to change your package, and import modloader from its package. Forge changed it up quite a bit in the last update, and t made it so old tutorials won't work.
1
brianblokster
02/04/2013 8:34 pm
Level 43 : Master Nerd
Oh jeez, looks like I screwed up a bit. I apologize, it was early in the morning and my brain was not awake, apparently. Well looks like you cleared things up here.
1
IAmChosen
02/04/2013 10:05 pm
Level 36 : Artisan Modder
No worry, it's pretty easy to mess up on something like programming.
1
Dig03
02/03/2013 5:56 pm
Level 21 : Expert Nerd
You've done something wrong during the tutorial redo it and see if its fixed "basemod" is the base coding of your mob so you've got a big crack in your programming
1
DerpyZ
02/03/2013 5:52 pm
Level 15 : Journeyman Lava Rider
Honestly, I've never had trouble making mods, just Force Update, and try again :3
1

Welcome