reverse network list command order

This commit is contained in:
Darkere
2021-10-15 20:57:37 +02:00
parent b2d86db9a5
commit 49286aee4f

View File

@@ -15,6 +15,7 @@ import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.Comparator;
public class ListNetworkCommand implements Command<CommandSource> { public class ListNetworkCommand implements Command<CommandSource> {
private static final DecimalFormat TIME_FORMATTER = new DecimalFormat("########0.000"); private static final DecimalFormat TIME_FORMATTER = new DecimalFormat("########0.000");
@@ -34,7 +35,7 @@ public class ListNetworkCommand implements Command<CommandSource> {
.all() .all()
.stream() .stream()
.map(NetworkInList::new) .map(NetworkInList::new)
.sorted((a, b) -> Double.compare(b.tickTime, a.tickTime)) .sorted(Comparator.comparingDouble(network -> network.tickTime))
.forEach(listItem -> sendInfo(context, listItem, false)); .forEach(listItem -> sendInfo(context, listItem, false));
return 0; return 0;