Soviet Posted June 27, 2013 Share Posted June 27, 2013 Hello, I'm looking for a tutorial on how to make custom tools and armour on Minecraft 1.5.2. I've followed Havvy's tutorials, but the tools tutorial isn't done yet; I would like to know if anyone would be willing to help me out or to give me a proper tutorial. Thanks by advance, Have a great day. Quote Link to comment Share on other sites More sharing options...
mar21 Posted June 27, 2013 Share Posted June 27, 2013 You think custom tool like custom axe/pickaxe/shovel or universal tool ? Quote Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM] If you want to use my API please give me a Karma/Thank you Sorry for some bad words ´cause I am not a walkin´ library! Link to comment Share on other sites More sharing options...
Soviet Posted June 27, 2013 Author Share Posted June 27, 2013 You think custom tool like custom axe/pickaxe/shovel or universal tool ? I'm thinking of an axe, pickaxe, shovel, sword and hoe; in separate tools. Quote Link to comment Share on other sites More sharing options...
mar21 Posted June 27, 2013 Share Posted June 27, 2013 You need Material for these tools, I think you want to have your own material.. all these lines you need to write into the base class of your mod! public static EnumToolMaterial matname = EnumHelper.addToolMaterial("unlocalNameofMaterial",harvest level,maxUses,efficiency,damage,enchantibility); Example of Material: public static EnumToolMaterial STAR = EnumHelper.addToolMaterial("STAR", 2, 625, 6.0F, 4, 10); And this is for the custom tool: You need to extend: ItemAxe for custom axe ItemPickaxe for custom pickaxe ItemHoe for custom hoe ItemSword for custom sword ItemSpade for custom shovel ItemTool for custom universal tool Example create a class customAxe and edit the: public class customAxe to public class customAxe extends ItemAxe And you have to add unimplemented methods... Quote Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM] If you want to use my API please give me a Karma/Thank you Sorry for some bad words ´cause I am not a walkin´ library! Link to comment Share on other sites More sharing options...
Soviet Posted June 27, 2013 Author Share Posted June 27, 2013 You need Material for these tools, I think you want to have your own material.. all these lines you need to write into the base class of your mod! public static EnumToolMaterial matname = EnumHelper.addToolMaterial("unlocalNameofMaterial",harvest level,maxUses,efficiency,damage,enchantibility); Example of Material: public static EnumToolMaterial STAR = EnumHelper.addToolMaterial("STAR", 2, 625, 6.0F, 4, 10); And this is for the custom tool: You need to extend: ItemAxe for custom axe ItemPickaxe for custom pickaxe ItemHoe for custom hoe ItemSword for custom sword ItemSpade for custom shovel ItemTool for custom universal tool Example create a class customAxe and edit the: public class customAxe to public class customAxe extends ItemAxe And you have to add unimplemented methods... Can you explain what are the numbers in the EnumHelper ? (I know the harvest level of 3 = minable obsidian, but I forgot about the others) Quote Link to comment Share on other sites More sharing options...
HydroBane Posted June 27, 2013 Share Posted June 27, 2013 An explanation is in the spoiler above it Quote Link to comment Share on other sites More sharing options...
Soviet Posted June 27, 2013 Author Share Posted June 27, 2013 Thank you, I've taken the basic EnumToolMaterial to compare to vanilla Minecraft materials. Thanks again for your time! Quote Link to comment Share on other sites More sharing options...
Soviet Posted June 27, 2013 Author Share Posted June 27, 2013 Hum... I don't know why but my Eclipse doesn't seem to like EnumHelper... "EnumHelper cannot be resolved" Quote Link to comment Share on other sites More sharing options...
mar21 Posted June 27, 2013 Share Posted June 27, 2013 Can you post the code ? Have you imported all right ? Quote Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM] If you want to use my API please give me a Karma/Thank you Sorry for some bad words ´cause I am not a walkin´ library! Link to comment Share on other sites More sharing options...
Soviet Posted June 27, 2013 Author Share Posted June 27, 2013 public static EnumToolMaterial steelMaterial = EnumHelper.addToolMaterial("materialSteel", 2,550,6.2F,2.5,9); My imports: import s0vietique.alloycraft.common.CommonProxyClass; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; 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; Quote Link to comment Share on other sites More sharing options...
mar21 Posted June 27, 2013 Share Posted June 27, 2013 I think you need int, not double in section of the code with bold text public static EnumToolMaterial steelMaterial = EnumHelper.addToolMaterial("materialSteel", 2,550,6.2F,2.5,9); So, it need to be (I think): public static EnumToolMaterial steelMaterial = EnumHelper.addToolMaterial("materialSteel", 2,550,6.2F,3,9); And you need to import this: import net.minecraftforge.common.EnumHelper; I wish this will get out the error! //EDIT You need to take attention on the variable types, like: (examples) Float - 0.0F,0.5F,1.6F Double - 0.0,1.0 Boolean - true/false Int - 1,2,3,5 String - "String" Quote Check out my m2cAPI: http://pastebin.com/SJmjgdgK [WIP! If something doesnt work or you have a better resolution, write me a PM] If you want to use my API please give me a Karma/Thank you Sorry for some bad words ´cause I am not a walkin´ library! Link to comment Share on other sites More sharing options...
Soviet Posted June 27, 2013 Author Share Posted June 27, 2013 It actually works! Thanks again for your help! Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.