From 103f655fa43d75630ae76f4b50f8f6d4764f5f8f Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 12 Nov 2019 15:59:44 -0500 Subject: [PATCH] Removed boolean usage --- .../anuke/mindustry/world/blocks/power/PowerNode.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java b/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java index 12f9bdc1db..6a5d1e9c11 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java @@ -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 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 iterator){