Removed boolean usage

This commit is contained in:
Anuken
2019-11-12 15:59:44 -05:00
parent 1dfaf3897c
commit 103f655fa4

View File

@ -19,6 +19,8 @@ import io.anuke.mindustry.world.meta.*;
import static io.anuke.mindustry.Vars.*;
public class PowerNode extends PowerBlock{
protected static boolean returnValue = false;
protected ObjectSet<PowerGraph> graphs = new ObjectSet<>();
protected Vector2 t1 = new Vector2(), t2 = new Vector2();
protected TextureRegion laser, laserEnd;
@ -339,11 +341,9 @@ public class PowerNode extends PowerBlock{
}
public static boolean insulated(int x, int y, int x2, int y2){
final Boolean[] bool = {false};
insulators(x, y, x2, y2, cause -> {
bool[0] = true;
});
return bool[0];
returnValue = false;
insulators(x, y, x2, y2, cause -> returnValue = true);
return returnValue;
}
public static void insulators(int x, int y, int x2, int y2, Cons<Tile> iterator){