Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Implemented Allow authors to supply their own raw entities into a querybuilder

Joined
Dec 10, 2014
Messages
3,332
Did some tests, Npcs.getLoaded() takes like 8ms, GameObjects takes like 30-40. I guess it would still help as you can pass in your already filtered sets :p
 
Joined
Dec 10, 2014
Messages
3,332
Why would you first filter it though
I don't know, possibly a cached set from a previous call? My initial request was because I assumed that getLoaded() took a while, but it really doesn't seem to take that long at all. I guess if you had a task tree where the lower tasks could utilize a set created by an upper task it would be a good idea, although idk how many people here use task trees, it seems like a lot of people usually only go one task deep
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
I don't know, possibly a cached set from a previous call? My initial request was because I assumed that getLoaded() took a while, but it really doesn't seem to take that long at all. I guess if you had a task tree where the lower tasks could utilize a set created by an upper task it would be a good idea, although idk how many people here use task trees, it seems like a lot of people usually only go one task deep
I use task trees pretty frequently. And it would indeed be nice to have. The reason I think a custom raw() population would be powerful is that you can join two sets of say LocatableEntities from Npcs.getLoaded() and GameObjects.getLoaded(), and query/sort them both at once.
 
Joined
Dec 10, 2014
Messages
3,332
I use task trees pretty frequently. And it would indeed be nice to have. The reason I think a custom raw() population would be powerful is that you can join two sets of say LocatableEntities from Npcs.getLoaded() and GameObjects.getLoaded(), and query/sort them both at once.
I guess with your own custom LocatableEntityQueryBuilder you could. You could probably even create your own wrapper that wraps common methods between the two types to extend the functionality beyond that of LocatableEntity, that would be an interesting thing to see :p
 
Top