#Looking for a useful method
27 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
iirc that doesn't exist anymore
use level.getEntities().filter()
the only method similar to what you're thinking of requires an AABB
i can't remember if it's just that or level.getEntities().getAll().filter()
was it part of kjs or mc?
kubejs
but then why was it removed ._.
not sure
last time i remember that existing was in 1.18.2
not necessarily
if it was called on server and not level then that's a different story
but usually filtering through entities (even on level tick) shouldn't cause any performance drops
you could try this if you really want at most microscopic changes in performance
let entities = level.getAllEntities().iterator()
while (entities.hasNext()) {
let entity = entities.next()
// code
}
my concern for performance was just the iteration itself, going through all the mobs and checking xyz data about them
