Posted April 1, 201411 yr So, I wanted to see if it was possible to make a single tool that could do multiple things. Like, an axe and pickaxe combined, or maybe a hoe that deals damage like a sword. I can't seem to figure out how one would go about coding such a thing, but I've seen things like it in other mods, so I'm assuming it's possible?
April 2, 201411 yr Make this tool a pick with the mining level you want if you want it as a pick, but then us this method: getStrVsBlock(ItemStack par1ItemStack, Block par2Block) You can set custom value for each block or i believe according to their material(don't quote me on that) Not sure if it is a good way, but it works. Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!
April 2, 201411 yr In 1.7.x, you can use the method setHarvestLevel("axe",n) and setHarvestLevel("pickaxe",m), and so on. Derive from itemTool for a start or the main type of tool it is. Or you could derive from ItemSword and just add in the toolClass settings. There is more to make it all work than just that, but it should get you started. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
April 3, 201411 yr Author It seems to have done the trick, at least for making my sword-hoe anyway, so yay ^^
April 3, 201411 yr So, I wanted to see if it was possible to make a single tool that could do multiple things. Like, an axe and pickaxe combined, or maybe a hoe that deals damage like a sword. I can't seem to figure out how one would go about coding such a thing, but I've seen things like it in other mods, so I'm assuming it's possible? In my mod "DivineRPG", we have something that is all tools into one, that's called the "Shickaxe" In out open src repo: (https://github.com/TheSlayerMC/DivineRPG) you can find the item that does everything Former developer for DivineRPG, Pixelmon and now the maker of Essence of the Gods
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.