Search in sources :

Example 1 with IRequireReliableTransport

use of logisticspipes.interfaces.routing.IRequireReliableTransport in project LogisticsPipes by RS485.

the class PipeLogisticsChassi method itemArrived.

@Override
public void itemArrived(ItemIdentifierStack item, IAdditionalTargetInformation info) {
    if (MainProxy.isServer(getWorld())) {
        if (info instanceof ChassiTargetInformation) {
            ChassiTargetInformation target = (ChassiTargetInformation) info;
            LogisticsModule module = _module.getSubModule(target.moduleSlot);
            if (module instanceof IRequireReliableTransport) {
                ((IRequireReliableTransport) module).itemArrived(item, info);
            }
        } else {
            if (LPConstants.DEBUG && info != null) {
                System.out.println(item);
                new RuntimeException("[ItemArrived] Information weren't ment for a chassi pipe").printStackTrace();
            }
        }
    }
}
Also used : LogisticsModule(logisticspipes.modules.abstractmodules.LogisticsModule) IRequireReliableTransport(logisticspipes.interfaces.routing.IRequireReliableTransport)

Example 2 with IRequireReliableTransport

use of logisticspipes.interfaces.routing.IRequireReliableTransport in project LogisticsPipes by RS485.

the class PipeLogisticsChassis method itemArrived.

@Override
public void itemArrived(ItemIdentifierStack item, IAdditionalTargetInformation info) {
    if (MainProxy.isServer(getWorld())) {
        if (info instanceof ChassiTargetInformation) {
            ChassiTargetInformation target = (ChassiTargetInformation) info;
            LogisticsModule module = getSubModule(target.moduleSlot);
            if (module instanceof IRequireReliableTransport) {
                ((IRequireReliableTransport) module).itemArrived(item, info);
            }
        } else {
            if (LogisticsPipes.isDEBUG() && info != null) {
                System.out.println(item);
                new RuntimeException("[ItemArrived] Information weren't ment for a chassi pipe").printStackTrace();
            }
        }
    }
}
Also used : LogisticsModule(logisticspipes.modules.LogisticsModule) IRequireReliableTransport(logisticspipes.interfaces.routing.IRequireReliableTransport)

Example 3 with IRequireReliableTransport

use of logisticspipes.interfaces.routing.IRequireReliableTransport in project LogisticsPipes by RS485.

the class PipeLogisticsChassis method itemLost.

@Override
public void itemLost(ItemIdentifierStack item, IAdditionalTargetInformation info) {
    if (MainProxy.isServer(getWorld())) {
        if (info instanceof ChassiTargetInformation) {
            ChassiTargetInformation target = (ChassiTargetInformation) info;
            LogisticsModule module = getSubModule(target.moduleSlot);
            if (module instanceof IRequireReliableTransport) {
                ((IRequireReliableTransport) module).itemLost(item, info);
            }
        } else {
            if (LogisticsPipes.isDEBUG()) {
                System.out.println(item);
                new RuntimeException("[ItemLost] Information weren't ment for a chassi pipe").printStackTrace();
            }
        }
    }
}
Also used : LogisticsModule(logisticspipes.modules.LogisticsModule) IRequireReliableTransport(logisticspipes.interfaces.routing.IRequireReliableTransport)

Example 4 with IRequireReliableTransport

use of logisticspipes.interfaces.routing.IRequireReliableTransport in project LogisticsPipes by RS485.

the class PipeLogisticsChassi method itemLost.

@Override
public void itemLost(ItemIdentifierStack item, IAdditionalTargetInformation info) {
    if (MainProxy.isServer(getWorld())) {
        if (info instanceof ChassiTargetInformation) {
            ChassiTargetInformation target = (ChassiTargetInformation) info;
            LogisticsModule module = _module.getSubModule(target.moduleSlot);
            if (module instanceof IRequireReliableTransport) {
                ((IRequireReliableTransport) module).itemLost(item, info);
            }
        } else {
            if (LPConstants.DEBUG) {
                System.out.println(item);
                new RuntimeException("[ItemLost] Information weren't ment for a chassi pipe").printStackTrace();
            }
        }
    }
}
Also used : LogisticsModule(logisticspipes.modules.abstractmodules.LogisticsModule) IRequireReliableTransport(logisticspipes.interfaces.routing.IRequireReliableTransport)

Aggregations

IRequireReliableTransport (logisticspipes.interfaces.routing.IRequireReliableTransport)4 LogisticsModule (logisticspipes.modules.LogisticsModule)2 LogisticsModule (logisticspipes.modules.abstractmodules.LogisticsModule)2