SteamWar/BauSystem2.0
Archiviert
12
0

Add 400 tnt test
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-04-10 21:15:09 +02:00
Ursprung 8d4f1bf2da
Commit 5f6696885d

Datei anzeigen

@ -27,10 +27,7 @@ import org.bukkit.util.BoundingBox;
import org.bukkit.util.Vector;
import org.bukkit.util.VoxelShape;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
public class Simulator19 implements Simulator {
@ -42,11 +39,23 @@ public class Simulator19 implements Simulator {
@Override
public synchronized void run() {
TNT tnt = new TNT(0, 120, 0);
do {
System.out.println(tnt);
} while (!tnt.tick());
System.out.println(tnt);
List<TNT> tntList = new ArrayList<>();
for (int i = 0; i < 400; i++) {
tntList.add(new TNT(0, 120, 0));
}
long time = System.currentTimeMillis();
while (!tntList.isEmpty()) {
List<TNT> remove = new ArrayList<>();
for (TNT tnt : tntList) {
if (tnt.getFuse() == 0) {
remove.add(tnt);
continue;
}
tnt.tick();
}
tntList.removeAll(remove);
}
System.out.println("Time: " + (System.currentTimeMillis() - time) + "ms");
BLOCK_TYPES_MAP.clear();
BLOCK_DATA_MAP.clear();