findPylonItemInInventory

fun findPylonItemInInventory(inventory: Inventory, targetItem: PylonItem): Int?(source)

Finds a Pylon item in an inventory. Use this to find Pylon items instead of traditional find methods, because this will compare Pylon 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 Pylon ID