The following is the code that was used to make the Base Mod in my video tutorial on Minecraft Modding.
package tutorial.generic;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod(modid=Generic.MODID, name=Generic.MODNAME, version=Generic.MODVER) //Tell forge “Oh hey, there’s a new mod here to load.”
public class Generic //Start the class Declaration
{
//Set the ID of the mod (Should be lower case).
public static final String MODID = “generic”;
//Set the “Name” of the mod.
public static final String MODNAME = “Generic Mod”;
//Set the version of the mod.
public static final String MODVER = “0.0.0”;
@Instance(value = Generic.MODID) //Tell Forge what instance to use.
public static Generic instance;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
}
@EventHandler
public void load(FMLInitializationEvent event)
{
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Copy and paste this code. For all those that are confused, check out my Minecraft Modding Playlist on YouTube:
Thank You for watching my videos in Advance and have a good day!