Posted August 22, 201312 yr The errors are the bolded text: The error is: The constructor ToolAmethystSword(int, EnumToolMaterial) is undefined, ToolAmethystPickaxe cannot be resolved to a type, and The method setUnlocalizedName(String) in the type Item is not applicable for the arguments (Item). package AmethystTools; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; //Basic Mod Information @Mod(modid = "Amethyst", name = "Amethyst", version = "0.0.1") //Client & Server Side Requirements @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class AmethystToolsMain { //Define Tools public static Item amethystSword; public static Item amethystPickaxe; public static Item amethystAxe; public static Item amethystShovel; public static Item amethystHoe; //Define Material public static EnumToolMaterial Amethyst = EnumHelper.addToolMaterial("Amethyst", 3, 1200, 7.0F, 2.5F, 10); @EventHandler <---This was imported already. public void load(FMLPreInitializationEvent Event) { //Tool Settings amethystSword = new ToolAmethystSword(1000, Amethyst); amethystPickaxe = new ToolAmethystPickaxe(1001, Amethyst); amethystAxe = new ToolAmethystAxe(1002, Amethyst); amethystShovel = new ToolAmethystSword(1003, Amethyst); amethystHoe = new ToolAmethystSword(1004, Amethyst); //Register Tools GameRegistry.registerItem(amethystSword, "amethystSword"); LanguageRegistry.addName(amethystSword, "Amethyst Sword"); GameRegistry.registerItem(amethystPickaxe, "amethystPickaxe"); LanguageRegistry.addName(amethystPickaxe, "Amethyst Pickaxe"); GameRegistry.registerItem(amethystAxe, "amethystAxe"); LanguageRegistry.addName(amethystAxe, "Amethyst Axe"); GameRegistry.registerItem(amethystShovel, "amethystShovel"); LanguageRegistry.addName(amethystShovel, "Amethyst Shovel"); GameRegistry.registerItem(amethystHoe, "amethystHoe"); LanguageRegistry.addName(amethystHoe, "Amethyst Hoe"); //Define Recipes for Tools GameRegistry.addRecipe(new ItemStack(amethystSword), new Object[] {" A ", " A ", " S ", 'A', Item.amethystGem, 'S', Item.stick}); GameRegistry.addRecipe(new ItemStack(amethystPickaxe), new Object[] {"AAA", " S ", " S ", 'A', Item.amethystGem, 'S', Item.stick}); GameRegistry.addRecipe(new ItemStack(amethystAxe), new Object[] {"AA ", "AS ", " S ", 'A', Item.amethystGem, 'S', Item.stick}); GameRegistry.addRecipe(new ItemStack(amethystShovel), new Object[] {" A ", " S ", " S ", 'A', Item.amethystGem, 'S', Item.stick}); GameRegistry.addRecipe(new ItemStack(amethystHoe), new Object[] {"AA ", " S ", " S ", 'A', Item.amethystGem, 'S', Item.stick}); } }
August 22, 201312 yr stop flooding the boards with basic java question! how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 22, 201312 yr Rule #0: Learning is a part of programming. Rule #1: Follow Java naming convention. Rule #2: When you don't know or understand something, search it.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.