This commit is contained in:
Anuken
2019-10-28 00:51:00 -04:00
parent a5cec84be1
commit d342c2c081
@@ -134,7 +134,7 @@ public class PowerNode extends PowerBlock{
graphs.clear(); graphs.clear();
Geometry.circle(tile.x, tile.y, (int)(laserRange + 1), (x, y) -> { Geometry.circle(tile.x, tile.y, (int)(laserRange + 1), (x, y) -> {
Tile other = world.ltile(x, y); Tile other = world.ltile(x, y);
if(valid.test(other)){ if(valid.test(other) && !tempTiles.contains(other)){
tempTiles.add(other); tempTiles.add(other);
} }
}); });
@@ -163,8 +163,6 @@ public class PowerNode extends PowerBlock{
TileEntity entity = tile.entity(); TileEntity entity = tile.entity();
other = other.link(); other = other.link();
Tile result = other;
if(linkValid(tile, other)){ if(linkValid(tile, other)){
tile.configure(other.pos()); tile.configure(other.pos());
return false; return false;
@@ -172,7 +170,9 @@ public class PowerNode extends PowerBlock{
if(tile == other){ if(tile == other){
if(other.entity.power.links.size == 0){ if(other.entity.power.links.size == 0){
getPotentialLinks(tile, link -> tile.configure(link.pos())); getPotentialLinks(tile, link -> {
tile.configure(link.pos());
});
}else{ }else{
while(entity.power.links.size > 0){ while(entity.power.links.size > 0){
tile.configure(entity.power.links.get(0)); tile.configure(entity.power.links.get(0));