Jump to content

ModLoader.addRecipe error


Recommended Posts

I'm learning how to make mods for Minecraft and in a tutorial I was following it was teaching me how to make a basic sword, however I am getting this error:

The method addRecipe(ShapedRecipes, Object[]) in the type ModLoader is not applicable for the arguments (ItemStack, Object[])

This is my code:

package net.minecraft.src;

import java.util.Random;


public class mod_FirstMod extends BaseMod



    public static final Item CrossoverSword = new ItemSword(2101, EnumToolMaterial.CSWORD).setItemName("swrd");

    public void load()


        CrossoverSword.iconIndex = ModLoader.addOverride("/gui/items.png" , "/items/WoodenAwesome.png");

        ModLoader.addName(CrossoverSword, "Crossover Sword");

        ModLoader.addRecipe(new ItemStack(CrossoverSword,1), new Object[]{

            "&*&", " * ", " X ", Character.valueOf('&'), Block.cobblestone,

            Character.valueOf('X'), Item.stick, Character.valueOf('*'), Block.planks});






    public String getVersion()


        return "3.14159265";





Any help is appreciated.

Link to comment
Share on other sites

That error looks like the call is failing not when you issue it but when it's passed from ModLoader to Minecraft. Are you sure you're using the correct version of ModLoader for your version of Minecraft and MCP?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...