Guest Posted June 19, 2012 Posted June 19, 2012 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.
Neowulf Posted June 20, 2012 Posted June 20, 2012 Try using letters instead of the special characters in the recipe layout. Sorry, a bit sick right now so my brain no worky fully.
jakj Posted June 20, 2012 Posted June 20, 2012 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?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now