fix relay fixes #3138
This commit is contained in:
@@ -96,11 +96,18 @@ public interface INetworkNode {
|
||||
* @param direction the direction
|
||||
* @return whether a network signal can be conducted in the given direction.
|
||||
*/
|
||||
|
||||
default boolean canConduct(Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param direction the direction
|
||||
* @return whether the network node can receiver network connections from this side
|
||||
*/
|
||||
default boolean canReceive(Direction direction) {
|
||||
return canConduct(direction);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param owner the owner
|
||||
*/
|
||||
|
||||
@@ -238,7 +238,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor {
|
||||
if (oppositeNode == null) {
|
||||
continue;
|
||||
}
|
||||
if (canConduct(facing) && oppositeNode.canConduct(facing.getOpposite())) {
|
||||
if (canConduct(facing) && oppositeNode.canReceive(facing.getOpposite())) {
|
||||
operator.apply(world, pos.offset(facing), facing.getOpposite());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,11 @@ public class RelayNetworkNode extends NetworkNode {
|
||||
return canUpdate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceive(Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRebuildGraphOnChange() {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user