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

Hello so I was wondering if I am to have a Block let's say for example Ruby Ore, and this Ruby Ore needs level 4 harvest level = Meaning diamond cannot mine it, how would this be done since this is currently what I have for my code:

setSoundType(SoundType.STONE);
		setHardness(5.0F);
		setResistance(30.0F);
		setHarvestLevel("pickaxe", 12);
		
		//Sets the Light Level (Makes the block emit light)
		//setLightLevel(1.0F);
		
		//Sets the Opacity Level (Makes the block like glass)
		//setLightOpacity(1);
		
		//Makes the block unbreakable
		//setBlockUnbreakable();

How come a diamond pick can still mine this? What would I have to do to make "more/new" harvest levels?

 

Source:

https://github.com/BloodshotPico/GemsAndMinerals

 

~Blood

Edited by BloodshotPico
Added source link

54 minutes ago, BloodshotPico said:

How come a diamond pick can still mine this? What would I have to do to make "more/new" harvest levels?

Did you know that an Iron pickaxe can still mine obsidian, but it just can't harvest obsidian. Does your block drop itself when mined by diamond?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
14 minutes ago, Animefan8888 said:

Did you know that an Iron pickaxe can still mine obsidian, but it just can't harvest obsidian. Does your block drop itself when mined by diamond?

No it drops the gem instead.

29 minutes ago, BloodshotPico said:

No it drops the gem instead.

Try changing the Material you are using.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

8 minutes ago, BloodshotPico said:

This happens for all my materials.

I'm not sure you understood what I meant, I meant change your ores material from Material.GROUND to Material.ROCK

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author
1 minute ago, Animefan8888 said:

I'm not sure you understood what I meant, I meant change your ores material from Material.GROUND to Material.ROCK

Oh okay sorry I'll try that. :D

Absolutely, that's required. In the Material class, you'll find that only some of the default materials for blocks invoke a method that causes them to require a tool. Material.ROCK is one of them; Material.GROUND is not, which is why you can break dirt with your hand but a shovel mines it faster. (Note: If this is considered a necropost, feel free to delete, if you have the permissions to do so. Just trying to be helpful.)

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.