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!
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!
6
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";
}
}
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.
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.
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.
No worry, it's pretty easy to mess up on something like programming.
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
Honestly, I've never had trouble making mods, just Force Update, and try again :3
