NetworkedVirtualInventory

class NetworkedVirtualInventory(val virtualInventory: VirtualInventory) : NetworkedInvUIInventory

A NetworkedInventory wrapper for VirtualInventory

Constructors

Link copied to clipboard
constructor(virtualInventory: VirtualInventory)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val size: Int

The amount of inventory slots.

Link copied to clipboard
open override val uuid: UUID

The unique identifier of this EndPointContainer.

Link copied to clipboard
val virtualInventory: VirtualInventory

Functions

Link copied to clipboard
open override 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
open override fun canTake(slot: Int, amount: Int): Boolean

Checks whether amount items can be taken from slot.

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

Copies the contents of this inventory to destination.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isEmpty(): Boolean

Whether all slots of this inventory are empty.

Link copied to clipboard
open override fun isFull(): Boolean

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

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

Takes amount items from slot.