【BUG】Can not change "Block Modification" requiredTool
blood789 opened this issue · 2 comments
Minecraft Version
1.19
KubeJS Version
kubejs-fabric-1900.5.5-build.27
Rhino Version
rhino-fabric-1802.1.14-build.190
Architectury Version
architectury-5.9.31-fabric
Forge/Fabric Version
fabric-api-0.57.0+1.19/1.19-Fabric 0.14.8
Describe your issue
I making a modpack, and want to change the harvest level of the tool and Modify the tools needed to mine the block.
Here is an example.
- Can not change requiredTool of the block. I write as this, and I would like to change the player to need an axe to chop down trees. But it does't work, I can chop down trees with hand. Can you give some example to change harvestTool('tool', level) for all block ?
For example, Iron ore requires a copper pickaxe to mine and stone pickaxe can not mine the iron ore.
-------------Level(Change)-----------vanilla
wooden ----0 -----------------------------0
stone--------1----------------------------1
copper------2-------------------------------
iron---------3-----------------------------2
diamond----4-----------------------------3
Mithril-------5
Netherite----6
...
onEvent('block.modification', event => {
event.modify('minecraft:birch_log', block => {
block.requiredTool = true // Make chop down the tree need an axe.
})
})
- In minecraft, the level of iron tool is 2, and it can mine the diamond ore. So is there a way to change the require level of the block? For example, mine the diamond ore need level 5.
Crash report/logs
No response
In 1.18 Mojang changed the tool tier and type system to use block tags instead. I updated the custom blocks page to reflect that, but forgot to do block mod too.
For more info which tags are what see the custom blocks page, or I'm sure the vanilla wiki has a page on it. You can also look at existing blocks with F3 open to see the tags they use.