mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-27 23:45:46 +00:00
Fix that self powered controller didnt count as controller in grid. (#691)
Co-authored-by: Maya <[email protected]>
This commit is contained in:
1 parent
597708e0e0
commit
47b72fb6d6
1 file changed
+14
@@ -48,6 +48,7 @@ import appeng.me.pathfinding.ControllerValidator;
|
||||
import appeng.me.pathfinding.IPathItem;
|
||||
import appeng.me.pathfinding.PathSegment;
|
||||
import appeng.tile.networking.TileController;
|
||||
import appeng.tile.networking.TileCreativeEnergyController;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class PathGridCache implements IPathingGrid {
|
||||
@@ -126,6 +127,19 @@ public class PathGridCache implements IPathingGrid {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (final IGridNode node : this.myGrid.getMachines(TileCreativeEnergyController.class)) {
|
||||
closedList.add((IPathItem) node);
|
||||
for (final IGridConnection gcc : node.getConnections()) {
|
||||
final GridConnection gc = (GridConnection) gcc;
|
||||
if (!(gc.getOtherSide(node).getMachine() instanceof TileController)) {
|
||||
final List<IPathItem> open = new LinkedList<>();
|
||||
closedList.add(gc);
|
||||
open.add(gc);
|
||||
gc.setControllerRoute((GridNode) node, true);
|
||||
this.active.add(new PathSegment(this, open, this.semiOpen, closedList));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user