getMiningLevel

int getMiningLevel(ItemStack stack, LivingEntity user)

Determines the mining level of the passed stack, which is used for calculating what blocks this tool is allowed to break.

Return

The mining level of the item. 3 is equal to a diamond pick.

Deprecated

Use getMiningLevel to detect tag and block.

Parameters

stack

The item stack being used to mine the block

user

The current user of the tool, or null if there isn't any

Sources

jvm source
Link copied to clipboard