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. Quote
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. Quote
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? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.