Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

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!

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.