counter results sorted by rate

This commit is contained in:
gnembon committed 2020-04-08 01:28:43 -03:00
1 parent a867c04b11
commit cdf7445e20
1 file changed
+1 -1
@@ -126,7 +126,7 @@ public class HopperCounter
color, ticks*1.0/(20*60), (realTime?" - real time":""), total, total*1.0*(20*60*60)/ticks),
"nb [X]", "^g reset", "!/counter "+color+" reset"
));
items.addAll(counter.object2LongEntrySet().stream().map(e ->
items.addAll(counter.object2LongEntrySet().stream().sorted((e, f) -> Long.compare(f.getLongValue(), e.getLongValue())).map(e ->
{
BaseText itemName = new TranslatableText(e.getKey().getTranslationKey());
long count = e.getLongValue();