lib-hand is an extremely lightweight mod that provides a way of modifying the default behaviour when harvesting blocks without the correct tool.
In practice, you can do stuff like:
To allow harvesting without the correct tool, add your block to the block tag hand:permitted. This will override the default behaviour of the block.
To require the correct tool when harvesting a block, add your block to the block tag hand:forbidden. This will override the default behaviour of the block, and will also override hand:permitted if set.
Here's an example resource file. It allows stone to be harvested without the use of a pickaxe.
1: {
2: "replace": false,
3: "values": [
4: "minecraft:stone"
5: ]
6: }
Here's some example ZenScript code. It prevents logs and planks from being harvested without the use of an axe.
1: <tag:blocks:hand:forbidden>.add(<tag:blocks:minecraft:logs>);
2: <tag:blocks:hand:forbidden>.add(<tag:blocks:minecraft:planks>);
No files available for download.