SteamWar/BauSystem2.0
Archiviert
12
0

Update ViewFlag.TIME
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-04-18 18:08:11 +02:00
Ursprung 83e5324986
Commit 47772ad23d

Datei anzeigen

@ -183,7 +183,18 @@ public abstract class ViewFlag {
@Override @Override
public void modify(REntityServer server, List<TraceEntity> entities) { public void modify(REntityServer server, List<TraceEntity> entities) {
for (TraceEntity entity : entities) { for (TraceEntity entity : entities) {
entity.setDisplayName(String.valueOf(entity.getRecords().get(0).getTicksSinceStart())); List<String> time = entity.getRecords()
.stream()
.map(TNTPoint::getTicksSinceStart)
.distinct()
.sorted()
.map(i -> i + "")
.collect(Collectors.toList());
if (time.size() <= 5) {
entity.setDisplayName(String.join(",", time));
} else {
entity.setDisplayName(time.stream().limit(5).collect(Collectors.joining(",")) + ", +" + (time.size() - 5));
}
} }
} }
}; };