Hello! Well, I've been following Wuppy's modding tutorial and Eclipse has thrown me an error. I cannot seem to find what I'm missing.
I made a new class and my intention is to define the new class in the main one.
package com.aphex.tutorial;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
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.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
@Mod(modid = AphexMod.MODID, version = AphexMod.VERSION)
public class AphexMod
{
public static final String MODID = "aphexmod";
public static final String VERSION = "1.0";
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
}
@EventHandler
public void init(FMLInitializationEvent event)
{
AphexMod.addRecipes(); /* Error lies here */
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Here is the main class ^^
package com.aphex.tutorial;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class AphexRecipe
{
public static void addRecipes()
{
GameRegistry.addRecipe(new ItemStack(Items.oak_door, 1),
" WW",
"W ",
" W",
'W', new ItemStack(Items.iron_ingot));
GameRegistry.addSmelting(new ItemStack(Items.oak_door), new ItemStack(Items.diamond_sword, 1), 1F);
}
}
^^ The recipe class.
Error - "The method addRecipes() is undefined for the type AphexMod. Any help appreciated.