Search in sources :

Example 1 with RSDeque

use of net.runelite.rs.api.RSDeque in project runelite by runelite.

the class RSClientMixin method getProjectiles.

@Inject
@Override
public List<Projectile> getProjectiles() {
    List<Projectile> projectiles = new ArrayList<Projectile>();
    RSDeque projectileDeque = this.getProjectilesDeque();
    Node head = projectileDeque.getHead();
    for (Node node = head.getNext(); node != head; node = node.getNext()) {
        projectiles.add((Projectile) node);
    }
    return projectiles;
}
Also used : RSDeque(net.runelite.rs.api.RSDeque) Node(net.runelite.api.Node) WidgetNode(net.runelite.api.WidgetNode) ArrayList(java.util.ArrayList) Projectile(net.runelite.api.Projectile) Inject(net.runelite.api.mixins.Inject)

Aggregations

ArrayList (java.util.ArrayList)1 Node (net.runelite.api.Node)1 Projectile (net.runelite.api.Projectile)1 WidgetNode (net.runelite.api.WidgetNode)1 Inject (net.runelite.api.mixins.Inject)1 RSDeque (net.runelite.rs.api.RSDeque)1