mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-10-25 20:22:23 +00:00
Improve canConnectToExternal() (#111)
* imrpove canConnectToExternal() * needUpdateConnections
This commit is contained in:
1 parent
251fcc26b0
commit
1fd7ae7567
2 files changed
+14
-1
No files matched your search
@@ -84,6 +84,8 @@ public abstract class AbstractConduit implements IConduit {
|
||||
|
||||
protected boolean connectionsDirty = true;
|
||||
|
||||
protected boolean needUpdateConnections = false;
|
||||
|
||||
protected AbstractConduit() {}
|
||||
|
||||
@Override
|
||||
@@ -461,7 +463,15 @@ public abstract class AbstractConduit implements IConduit {
|
||||
connectionsChanged();
|
||||
}
|
||||
|
||||
connectionsDirty = false;
|
||||
if (needUpdateConnections) {
|
||||
needUpdateConnections = false;
|
||||
} else {
|
||||
connectionsDirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected void needUpdateConnections() {
|
||||
needUpdateConnections = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -174,6 +174,9 @@ public class MEConduit extends AbstractConduit implements IMEConduit {
|
||||
if (node == null) {
|
||||
node = part.getGridNode();
|
||||
}
|
||||
if (node == null) {
|
||||
needUpdateConnections();
|
||||
}
|
||||
}
|
||||
} else if (te instanceof IGridHost) {
|
||||
node = ((IGridHost) te).getGridNode(dir.getOpposite());
|
||||
|
||||
Reference in new issue
Block a user