Search in sources :

Example 1 with RSItem

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

the class RSItemContainerMixin method getItems.

@Inject
@Override
public Item[] getItems() {
    int[] itemIds = getItemIds();
    int[] stackSizes = getStackSizes();
    Item[] items = new Item[itemIds.length];
    for (int i = 0; i < itemIds.length; ++i) {
        RSItem item = client.createItem();
        item.setId(itemIds[i]);
        item.setQuantity(stackSizes[i]);
        items[i] = item;
    }
    return items;
}
Also used : RSItem(net.runelite.rs.api.RSItem) Item(net.runelite.api.Item) RSItem(net.runelite.rs.api.RSItem) Inject(net.runelite.api.mixins.Inject)

Aggregations

Item (net.runelite.api.Item)1 Inject (net.runelite.api.mixins.Inject)1 RSItem (net.runelite.rs.api.RSItem)1