By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now!I don't see why you want to anyways. But I think inside the toArray() put new GroundItem[size of query] or somethingHow would I get an array from ground items I've tried:
GroundItem loot[] = GroundItems.newQuery().results().toArray();
GroundItem[] loot = GroundItems.newQuery().results().toArray();
Well you can use the .filter() method.Trying to figure out, how I can see grounditems value, then pick up if over like 1k. But can't seem to figure it out..
LocatableEntityQueryResults<GroundItem> groundItems = GroundItems.newQuery().filter(o -> {
ItemDefinition def = o.getDefinition();
return def != null && def.isTradeable() && GrandExchange.lookup(def.getId()).getPrice() > 1000;
}).results();
@OP if you'll do something like this (that contains for example GrandExchange.lookup) make sure to store values for further usage to avoid external lookups.Code:LocatableEntityQueryResults<GroundItem> groundItems = GroundItems.newQuery().filter(o -> { ItemDefinition def = o.getDefinition(); return def != null && def.isTradeable() && GrandExchange.lookup(def.getId()).getPrice() > 1000; }).results();
Try something like that?
Of course, caching values is extremely effective and should be used. I just wrote this real fast@OP if you'll do something like this (that contains for example GrandExchange.lookup) make sure to store values for further usage to avoid external lookups.
i said @OP at the begginingOf course, caching values is extremely effective and should be used. I just wrote this real fast
We use essential cookies to make this site work, and optional cookies to enhance your experience.