Class ColoredConnectionStrategy
java.lang.Object
com.refinedmods.refinedstorage.common.support.network.SimpleConnectionStrategy
com.refinedmods.refinedstorage.common.support.network.ColoredConnectionStrategy
- All Implemented Interfaces:
ConnectionStrategy
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Supplier
<net.minecraft.world.level.block.state.BlockState> Fields inherited from class com.refinedmods.refinedstorage.common.support.network.SimpleConnectionStrategy
origin
-
Constructor Summary
ConstructorDescriptionColoredConnectionStrategy
(Supplier<net.minecraft.world.level.block.state.BlockState> blockStateProvider, net.minecraft.core.BlockPos origin) -
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.protected final boolean
colorsAllowConnecting
(net.minecraft.world.level.block.state.BlockState connectingState)
-
Field Details
-
blockStateProvider
-
-
Constructor Details
-
ColoredConnectionStrategy
public ColoredConnectionStrategy(Supplier<net.minecraft.world.level.block.state.BlockState> blockStateProvider, 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
- Overrides:
addOutgoingConnections
in classSimpleConnectionStrategy
- 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
- Overrides:
canAcceptIncomingConnection
in classSimpleConnectionStrategy
- Parameters:
incomingDirection
- the incoming directionconnectingState
- the state wanting to connect- Returns:
- whether the node can accept an incoming connection
-
colorsAllowConnecting
protected final boolean colorsAllowConnecting(net.minecraft.world.level.block.state.BlockState connectingState)
-