Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
8d4f1bf2da
Commit
5f6696885d
@ -27,10 +27,7 @@ import org.bukkit.util.BoundingBox;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
import org.bukkit.util.VoxelShape;
|
import org.bukkit.util.VoxelShape;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class Simulator19 implements Simulator {
|
public class Simulator19 implements Simulator {
|
||||||
|
|
||||||
@ -42,11 +39,23 @@ public class Simulator19 implements Simulator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void run() {
|
public synchronized void run() {
|
||||||
TNT tnt = new TNT(0, 120, 0);
|
List<TNT> tntList = new ArrayList<>();
|
||||||
do {
|
for (int i = 0; i < 400; i++) {
|
||||||
System.out.println(tnt);
|
tntList.add(new TNT(0, 120, 0));
|
||||||
} while (!tnt.tick());
|
}
|
||||||
System.out.println(tnt);
|
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_TYPES_MAP.clear();
|
||||||
BLOCK_DATA_MAP.clear();
|
BLOCK_DATA_MAP.clear();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren