findRebarItemInInventory

fun findRebarItemInInventory(inventory: Inventory, targetItem: RebarItem): Int?(source)

Finds a Rebar item in an inventory. Use this to find Rebar items instead of traditional find methods, because this will compare Rebar IDs.

Return

The slot containing the item, or null if no item was found

Parameters

inventory

The inventory to search

targetItem

The item to find. Items will be compared by their Rebar ID