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

Hey, I was wondering if and how you change the harvest level of a block with multiple variants or metadata.

 

For example I have made this block which in my initiation class is called "ORE_OVERWORLD" which is in the class BlockOres  where it's currently split into two variants of ores and I want the first ore to be able to be minable by iron by setting its harvest level to 2 but I want the second ore to only be able to be minable by the first ore by setting its harvest level to 4 but I don't know how to go about doing this.


I've seen people talking about overriding the setHarvestLevel but I don't know how to do that either so if someone could point me in a direction where I can read up on that more that'd be great.

override canHarvestBlock

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Isn't that for tools only though?


What I wanted to change was the harvest levels required on the two different variants of the block.

  • Author

It worked!

This was far more easier than I anticipated, I have a tendancy to overcomplicate everything that has the easiest of solutions... Thank you so much for pointing out that I was missing the obvious :D

1 hour ago, Phealin said:

Isn't that for tools only though?


What I wanted to change was the harvest levels required on the two different variants of the block.

That's a method in the Block class.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.