Search in sources :

Example 1 with LogisticsDictPromise

use of logisticspipes.routing.LogisticsDictPromise in project LogisticsPipes by RS485.

the class ModuleCrafter method registerExtras.

@Override
public void registerExtras(IPromise promise) {
    if (promise instanceof LogisticsDictPromise) {
        _service.getItemOrderManager().addExtra(((LogisticsDictPromise) promise).getResource());
        return;
    } else {
        ItemIdentifierStack stack = new ItemIdentifierStack(promise.getItemType(), promise.getAmount());
        _service.getItemOrderManager().addExtra(new DictResource(stack, null));
    }
}
Also used : LogisticsDictPromise(logisticspipes.routing.LogisticsDictPromise) DictResource(logisticspipes.request.resources.DictResource) ItemIdentifierStack(logisticspipes.utils.item.ItemIdentifierStack)

Aggregations

DictResource (logisticspipes.request.resources.DictResource)1 LogisticsDictPromise (logisticspipes.routing.LogisticsDictPromise)1 ItemIdentifierStack (logisticspipes.utils.item.ItemIdentifierStack)1