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,

Despite setting the harvestTool, harvestLevel and strength of the block, the mining speed of my block doesn't change regardless of the level of pickaxe or if I use of a supposedly unsuitable tool instead. I get the same mining speed with fists as a netherite pick.

image.thumb.png.a6f4c6c527a20cbd348f9dc333bef303.png

The usage of destroy time did increase the mining speed but was still unaffected by tools.

I looked at the register for Diorite as it seems to be a similar block, but can't see any reason that would be affected by tools and my block isn't?

Could anyone please tell me what I'm missing? 

I've attempted to add .setRequiresTool() as it was suggested it works in this thread: 

 

but that no longer seems to be an option in 1.17 with BlockBehaviour.

  • Author

I've realised .requiresCorrectToolForDrops() is now whats in use instead of .setRequiresTool(). 

So it seems like .harvestLevel() and .harvestTool() aren't functioning as they should?

Edited by DireTook

  • Author

Ah right, I'm completely unfamiliar with tags so apologies. Thanks for the reply though.

I've attempted to add as you've said and ended up with two .Jsons under tags.blocks. One for mineable/pickaxe and one for needs_stone_tools both with code similar to: 

Capture.PNG.e3e21403a01e1283e085c58ab9f448a6.PNG 

However this doesn't seem to change anything yet and nothing I've found has been clear about the best way to add to blocks to vanilla block tags although custom tags and recipe stuff is talked about a lot. I figured its properly not best to just add my block to the BlockTagProvider class? Is there something I'm missing or am I just going the completely wrong direction?

17 minutes ago, DireTook said:

However this doesn't seem to change anything yet and nothing I've found has been clear about the best way to add to blocks to vanilla block tags although custom tags and recipe stuff is talked about a lot. I figured its properly not best to just add my block to the BlockTagProvider class? Is there something I'm missing or am I just going the completely wrong direction?

show the complete path of the tags

  • Author

Its src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.mineable.pickaxe.json

and src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.needs_stone_tools.json

image.png.6c94764821f2ae5284aa8ff5d130ec51.png

for this I have replaced the "examplemod:example_object" with my names: "tutorialmod_uniqueid309:example_block" 

Edited by DireTook

32 minutes ago, DireTook said:

Its src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.mineable.pickaxe.json

and src/main/resources/data.tutorialmod_uniqueid309.tags.blocks.needs_stone_tools.json

this are minecraft tags, so you need to put them in data.minecraft.tags folder

  • Author

That worked! Thank you very much!

Although the Minecraft folder didn't show in my main directory till I tried to add the tags.block folder to it in the Project and External Dependencies which I found odd. Maybe that's normal eclipse thing I've not experienced yet :D

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.