Get harvest level of an item procedure block

Published by aidanete on
Status
Fixed
Issue description

Will be cool to have a procedure block to check what is the harvest level of an item. Useful to check when a player breaks a block and uses custom drops with custom procedures, I think it will execute even without the correct tool for it, so this thing will be useful. Another example, a quest where you have to give someone a diamond or higher tier pickaxe to win. In this case, modded pickaxes will also work.

Late EDIT: Another very related idea, is a procedure block that detects the type of tool of a provided item. So, this will also be good for custom drop procedure for a block, detecting the type of tool and it's harvest level.

Thank you! :D

Issue comments

One can not check for the harvest level of the item, one can only check if the item can harvest a given block. Would this be a good alternative?

Tool would be useful to notify the player when harvest level tool < harvest level block etc.

I used the can Item harvest block procedure block to make a vein miner mod and the item was able to harvest bedrock, I was checking if my iron pickaxe with enchantment can break the block, the block was bedrock and it broke, I tried with obsidian too and my iron pick could break it according to the procedure block, is there a fix for this or do i need to manualy check the blocks and the item?

That was why I was testing whether the item could harvest the block using an if statement before breaking it, and apparently an iron pick could break bedrock.