️ Toggle (all) powernode connections by doubleclicking (#907)

* Toggle (all) powernode connections by doubleclicking

* Mimic return false of the above if
This commit is contained in:
Patrick 'Quezler' Mounier 2019-10-27 16:01:50 +01:00 committed by Anuken
parent 8a1ea7fd19
commit d969741f90

View File

@ -167,6 +167,18 @@ public class PowerNode extends PowerBlock{
tile.configure(other.pos());
return false;
}
if(tile == other){
if (other.entity.power.links.size == 0){
getPotentialLinks(tile, link -> tile.configure(link.pos()));
} else {
while (entity.power.links.size > 0){
tile.configure(entity.power.links.get(0));
}
}
return false;
}
return true;
}