NetworkedInventory

Properties

Link copied to clipboard
abstract val size: Int

The amount of inventory slots.

Link copied to clipboard
abstract val uuid: UUID

The unique identifier of this EndPointContainer.

Functions

Link copied to clipboard
abstract fun add(itemStack: ItemStack, amount: Int): Int

Adds an amount of itemStack to the inventory and returns how many items have been left over. The ItemStack.getAmount should be ignored, and the itemStack should not be modified.

Link copied to clipboard

Whether this inventory is allowed to exchange items with other.

Link copied to clipboard
abstract fun canTake(slot: Int, amount: Int): Boolean

Checks whether amount items can be taken from slot.

Link copied to clipboard
abstract fun copyContents(destination: Array<ItemStack>)

Copies the contents of this inventory to destination.

Link copied to clipboard
abstract fun isEmpty(): Boolean

Whether all slots of this inventory are empty.

Link copied to clipboard
abstract fun isFull(): Boolean

Whether all slots of this inventory are filled up to their maximum stack size.

Link copied to clipboard
abstract fun take(slot: Int, amount: Int)

Takes amount items from slot.