KubeJS-Mods / KubeJS

https://kubejs.com
GNU Lesser General Public License v3.0
307 stars 90 forks source link

Ability to add Tools Level requirements to Vanilla Blocks #816

Closed Shadows-Peak closed 6 months ago

Shadows-Peak commented 6 months ago

Describe the feature

I have looked around through various issues, and over the wiki, and tried to figure out how this might be possible with tags. However, if it is possible, then no one on here has bothered provided an example of such. What I would like to be possible is the capability to remove the need iron pickaxe tag from diamond ore, and add the need diamond pickaxe tag to it. Thank you for your help.

Additional info

I am using a 1.19.2 version

Shadows-Peak commented 6 months ago

Upon further examination, I made an error and found a way using a server event:

ServerEvents.tags('block', event => { event.remove('minecraft:needs_iron_tool','minecraft:diamond_ore') event.add('minecraft:needs_diamond_tool', 'minecraft:diamond_ore') })