DefaultItemHolder

class DefaultItemHolder(compound: Provider<Compound>, containers: Map<NetworkedInventory, NetworkConnectionType>, val mergedInventory: NetworkedInventory?, blockedFaces: Set<BlockFace>, defaultInventoryConfig: () -> Map<BlockFace, NetworkedInventory>, defaultConnectionConfig: () -> Map<BlockFace, NetworkConnectionType>?) : DefaultContainerEndPointDataHolder<NetworkedInventory> , ItemHolder

The default ItemHolder implementation.

Parameters

compound

the Compound for data storage and retrieval

containers

all available NetworkedInventories and their allowed NetworkConnectionType

mergedInventory

the NetworkedInventory that is the merged inventory of all NetworkedInventories, or null if there is no merged inventory

defaultInventoryConfig

the default (BlockFace, NetworkedInventory) to be used if no configuration is stored

defaultConnectionConfig

the default (BlockFace, NetworkConnectionType) to be used if no configuration is stored. If null, the connection config will be automatically generated using the highest possible connection type for each side.

Constructors

Link copied to clipboard
constructor(compound: Provider<Compound>, containers: Map<NetworkedInventory, NetworkConnectionType>, mergedInventory: NetworkedInventory?, blockedFaces: Set<BlockFace>, defaultInventoryConfig: () -> Map<BlockFace, NetworkedInventory>, defaultConnectionConfig: () -> Map<BlockFace, NetworkConnectionType>?)

Properties

Link copied to clipboard
open override val allowedFaces: Set<BlockFace>

A set of BlockFaces where connections are allowed.

Link copied to clipboard
override val blockedFaces: EnumSet<BlockFace>

The BlockFaces that can never have a connection.

Link copied to clipboard
override val channels: MutableMap<BlockFace, Int>

Stores the selected channels per BlockFace.

Link copied to clipboard

Stores the currently configured NetworkConnectionType per BlockFace.

Link copied to clipboard

Stores which C is accessible from what BlockFace.

Link copied to clipboard

Stores all available C and their allowed NetworkConnectionTypes.

Link copied to clipboard
open override val extractFilters: MutableMap<BlockFace, ItemFilter<*>>

Stores the extraction ItemFilters per BlockFace.

Link copied to clipboard
override val extractPriorities: MutableMap<BlockFace, Int>

Stores the extraction priorities per BlockFace.

Link copied to clipboard
open override val insertFilters: MutableMap<BlockFace, ItemFilter<*>>

Stores the insertion ItemFilters per BlockFace.

Link copied to clipboard
override val insertPriorities: MutableMap<BlockFace, Int>

Stores the insertion priorities per BlockFace.

Link copied to clipboard

Functions

Link copied to clipboard