#How to edit harvest level of a block?
18 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
whait needs_netherite_tool ? i have thought it's just a fabric thing and not forge
wait does forge even have a netherite tool tag tier? 
I was just wondering because the Fabric Wiki says that:
Fabric API provides dynamic tags for mining levels above diamond, as well as for wood (mining level 0). Dynamic mining level tags are in the format fabric:needs_tool_level_N, where N is the wanted tool level as an integer. For example, a mining level tag for netherite (mining level 4) would be fabric:needs_tool_level_4. Dynamic tags are checked automatically. You put these tags in resources/fabric/tags/blocks/.
I tried this and it does not work for me.
thankfully theres a forge event for everything
```js
ForgeEvents.onEvent('net.minecraftforge.event.entity.player.PlayerEvent$HarvestCheck', event => {
global.HarvestCheck(event)
})
let PickaxeItem = Java.loadClass("net.minecraft.world.item.PickaxeItem")
/**
*
- @param {Internal.PlayerEvent$HarvestCheck} event
*/
global.HarvestCheck = (event) => {
const { entity, targetBlock } = event
try {
if (targetBlock.block.id != "minecraft:ancient_debris") return
//Detect if the player has a netherite tool in their hand by tag
if (!entity.mainHandItem.hasTag("forge:tools/netherite") || !(entity.mainHandItem instanceof PickaxeItem)) {
event.setCanHarvest(false)
}
} catch (error) {
console.log(error)
}
}```
this is a startup script
Thank you! I will try this.
im pretty sure its forge:tools/netherite though youll have to double check which you can do with /kjs hand ofcourse
The script works but the tag doesnt. Though I used kjs hand and i dont see any tags specific to netherite on this list. Is there any way to get around this?
you can always add the pickaxes you want to the forge:tools/netherite tag
(or any tag you wanna make)
or if its just the netherite pickaxe you can do ```js
if (entity.mainHandItem.id != "minecraft:netherite_pickaxe" || !(entity.mainHandItem instanceof PickaxeItem))
Thank you that works, though I just remebered that there are 4 pickaxes that should be able to mine ancient debris so ill use tags instead. I think I can figure out tags on my own, but thank you for your help.
Ticket closed!