NetworkBridge

A type of NetworkNode that can connect multiple NetworkEndPoints, without having to place them next to each other. NetworkBridges with the same NetworkBridge.typeId can also connect to each other.

May be commonly known as "cable" or "pipe".

Types that inherit from both NetworkBridge and NetworkEndPoint are not allowed.

See also

Inheritors

Properties

Link copied to clipboard
abstract val isValid: Boolean

Whether this NetworkNode is valid and Networks including it should be ticked.

Link copied to clipboard
abstract val linkedNodes: Set<NetworkNode>

A set of NetworkNodes that are not connected via networks, but still share data and need to be clustered together, such as the left and right part of a double chest.

Link copied to clipboard
abstract val owner: OfflinePlayer?

The owner of this NetworkNode or null if it doesn't have one.

Link copied to clipboard
abstract val pos: BlockPos

The BlockPos of this NetworkNode

Link copied to clipboard
abstract val typeId: ResourceLocation

An identifier that defines which NetworkBridges can connect to each other.

Functions

Link copied to clipboard
open suspend fun handleNetworkLoaded(state: NetworkState)

Called when a NetworkNode is loaded into the state.

Link copied to clipboard
open suspend fun handleNetworkUpdate(state: NetworkState)

Called when a NetworkNode in one of the six cartesian directions is added, removed, or updated in a way that affects this node.