From 9d02ce78627be6b12967f95cfb1f9cafeb09013d Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Fri, 25 Sep 2020 13:31:51 +0200 Subject: [PATCH] Simplified Remove --- BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java index 36dc574..b96c414 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/world/Detonator.java @@ -84,9 +84,7 @@ public class Detonator implements Listener { try { powered = AutoLoader_15.getLever(activation.location.getBlock()); }catch (ClassCastException e) { - locs.forEach(detonatorActivation -> { - if(detonatorActivation.location.equals(activation.location)) locs.remove(detonatorActivation); - }); + locs.remove(activation); return; } AutoLoader_15.setRedstone(activation.location, !powered);