Search in sources :

Example 1 with StatusEntry

use of logisticspipes.pipes.basic.debug.StatusEntry in project LogisticsPipes by RS485.

the class ModuleActiveSupplier method addStatusInformation.

public void addStatusInformation(List<StatusEntry> status) {
    StatusEntry entry = new StatusEntry();
    entry.name = "Requested Items";
    entry.subEntry = new ArrayList<>();
    for (Entry<ItemIdentifier, Integer> part : _requestedItems.entrySet()) {
        StatusEntry subEntry = new StatusEntry();
        subEntry.name = part.toString();
        entry.subEntry.add(subEntry);
    }
    status.add(entry);
}
Also used : ItemIdentifier(logisticspipes.utils.item.ItemIdentifier) StatusEntry(logisticspipes.pipes.basic.debug.StatusEntry)

Example 2 with StatusEntry

use of logisticspipes.pipes.basic.debug.StatusEntry in project LogisticsPipes by RS485.

the class UpdateStatusEntries method readData.

@Override
public void readData(LPDataInput input) {
    windowID = input.readInt();
    status = input.readArrayList(new IReadListObject<StatusEntry>() {

        @Override
        public StatusEntry readObject(LPDataInput input) {
            StatusEntry status = new StatusEntry();
            status.name = input.readUTF();
            if (input.readBoolean()) {
                status.subEntry = input.readArrayList(this);
            }
            return status;
        }
    });
}
Also used : LPDataInput(network.rs485.logisticspipes.util.LPDataInput) StatusEntry(logisticspipes.pipes.basic.debug.StatusEntry) IReadListObject(logisticspipes.network.IReadListObject)

Example 3 with StatusEntry

use of logisticspipes.pipes.basic.debug.StatusEntry in project LogisticsPipes by RS485.

the class CoreRoutedPipe method addStatusInformation.

@Override
public void addStatusInformation(List<StatusEntry> status) {
    StatusEntry entry = new StatusEntry();
    entry.name = "Send Queue";
    entry.subEntry = new ArrayList<>();
    for (Triplet<IRoutedItem, ForgeDirection, ItemSendMode> part : _sendQueue) {
        StatusEntry subEntry = new StatusEntry();
        subEntry.name = part.toString();
        entry.subEntry.add(subEntry);
    }
    status.add(entry);
    entry = new StatusEntry();
    entry.name = "In Transit To Me";
    entry.subEntry = new ArrayList<>();
    for (ItemRoutingInformation part : _inTransitToMe) {
        StatusEntry subEntry = new StatusEntry();
        subEntry.name = part.toString();
        entry.subEntry.add(subEntry);
    }
    status.add(entry);
}
Also used : IRoutedItem(logisticspipes.logisticspipes.IRoutedItem) ItemRoutingInformation(logisticspipes.routing.ItemRoutingInformation) ForgeDirection(net.minecraftforge.common.util.ForgeDirection) StatusEntry(logisticspipes.pipes.basic.debug.StatusEntry)

Aggregations

StatusEntry (logisticspipes.pipes.basic.debug.StatusEntry)3 IRoutedItem (logisticspipes.logisticspipes.IRoutedItem)1 IReadListObject (logisticspipes.network.IReadListObject)1 ItemRoutingInformation (logisticspipes.routing.ItemRoutingInformation)1 ItemIdentifier (logisticspipes.utils.item.ItemIdentifier)1 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)1 LPDataInput (network.rs485.logisticspipes.util.LPDataInput)1