Item.toolMaterial

Gets the tool's material if the item is a tool. Items with ID 0 have unspecified material, 1 is the minimum (wood) and 5 is the maximum (diamond).

class Item
pure nothrow @property @safe @nogc
ubyte
toolMaterial
()

Examples

assert(new Items.Beetroot().toolMaterial == NO_TOOL);
assert(new Items.DiamondSword().toolMaterial == DIAMOND);

Meta