fromStack

@Contract(value = "null -> null")
fun fromStack(stack: ItemStack?): RebarItem?(source)

Gets a RebarItem from an ItemStack if the item is a Rebar item Returns null if the ItemStack is not a Rebar item


@Contract(value = "null -> null")
fun <T : RebarItem> fromStack(stack: ItemStack?, clazz: Class<T>): T?(source)

Converts a regular ItemStack to a RebarItem of class clazz Returns null if the ItemStack is not a Rebar item or is not of the specified clazz