sorted, not sort

This commit is contained in:
yrsegal@gmail.com 2022-04-08 20:37:07 -04:00
parent 898c4453b6
commit 620b751002

View file

@ -32,7 +32,7 @@ class OpGetEntitiesBy(val checker: Predicate<Entity>, val negate: Boolean) : Con
null,
aabb
) { (checker.test(it) != negate) && ctx.isEntityInRange(it) && it.distanceToSqr(pos) <= radius * radius }
.sortBy { it.distanceToSqr(pos) }
.sortedBy { it.distanceToSqr(pos) }
return spellListOf(entitiesGot)
}