Jump to content

Recommended Posts

Posted

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.

Posted

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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...