Interface ConnectionStrategy
- All Known Subinterfaces:
InWorldNetworkNodeContainer
- All Known Implementing Classes:
ColoredConnectionStrategy
,InWorldNetworkNodeContainerImpl
,SimpleConnectionStrategy
@API(status=STABLE,
since="2.0.0-milestone.3.6")
public interface ConnectionStrategy
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add outgoing connections here.boolean
canAcceptIncomingConnection
(net.minecraft.core.Direction incomingDirection, net.minecraft.world.level.block.state.BlockState connectingState) Returns whether the (not yet discovered) node can accept an incoming connection.
-
Method Details
-
addOutgoingConnections
Add outgoing connections here. Called when a node is about to be added into the network graph. If the outgoing connections ever change, callRefinedStorageApi.updateNetworkNodeContainer(InWorldNetworkNodeContainer, Level)
.- Parameters:
sink
- the sink that accepts outgoing connections
-
canAcceptIncomingConnection
boolean canAcceptIncomingConnection(net.minecraft.core.Direction incomingDirection, net.minecraft.world.level.block.state.BlockState connectingState) Returns whether the (not yet discovered) node can accept an incoming connection. Changes to this return value won't cause a rebuild of the network state. If the return value ever changes, callRefinedStorageApi.updateNetworkNodeContainer(InWorldNetworkNodeContainer, Level)
.- Parameters:
incomingDirection
- the incoming directionconnectingState
- the state wanting to connect- Returns:
- whether the node can accept an incoming connection
-