Class SimpleConnectionStrategy
java.lang.Object
com.refinedmods.refinedstorage.common.support.network.SimpleConnectionStrategy
- All Implemented Interfaces:
ConnectionStrategy
- Direct Known Subclasses:
ColoredConnectionStrategy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd outgoing connections here.booleancanAcceptIncomingConnection(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.
-
Field Details
-
origin
protected final net.minecraft.core.BlockPos origin
-
-
Constructor Details
-
SimpleConnectionStrategy
public SimpleConnectionStrategy(net.minecraft.core.BlockPos origin)
-
-
Method Details
-
addOutgoingConnections
Description copied from interface:ConnectionStrategyAdd 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).- Specified by:
addOutgoingConnectionsin interfaceConnectionStrategy- Parameters:
sink- the sink that accepts outgoing connections
-
canAcceptIncomingConnection
public boolean canAcceptIncomingConnection(net.minecraft.core.Direction incomingDirection, net.minecraft.world.level.block.state.BlockState connectingState) Description copied from interface:ConnectionStrategyReturns 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).- Specified by:
canAcceptIncomingConnectionin interfaceConnectionStrategy- Parameters:
incomingDirection- the incoming directionconnectingState- the state wanting to connect- Returns:
- whether the node can accept an incoming connection
-