Class SimpleConnectionStrategy
java.lang.Object
com.refinedmods.refinedstorage.common.support.network.SimpleConnectionStrategy
- All Implemented Interfaces:
ConnectionStrategy
- Direct Known Subclasses:
ColoredConnectionStrategy
-
Field Summary
-
Constructor Summary
-
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.
-
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:ConnectionStrategy
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)
.- Specified by:
addOutgoingConnections
in 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:ConnectionStrategy
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)
.- Specified by:
canAcceptIncomingConnection
in interfaceConnectionStrategy
- Parameters:
incomingDirection
- the incoming directionconnectingState
- the state wanting to connect- Returns:
- whether the node can accept an incoming connection
-