From bf1dbd5bb2d9321cf2c46d962551106fa3dcadc3 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 9 Apr 2022 23:12:15 +0200 Subject: [PATCH] Fix Simulator move all with multiple prime phases Signed-off-by: yoyosource --- .../steamwar/bausystem/features/simulator/TNTSimulator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java index b116983b..31f08799 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/TNTSimulator.java @@ -312,9 +312,9 @@ public class TNTSimulator { } private void updatePosition(Set tntSpawns, Consumer positionChanger) { - Set vectors = new HashSet<>(); + Map vectors = new IdentityHashMap<>(); for (TNTSpawn tntSpawn : tntSpawns) { - if (vectors.add(tntSpawn.position)) { + if (vectors.put(tntSpawn.position, true) == null) { positionChanger.accept(tntSpawn.position); } }