Search in sources :

Example 1 with ITriggerInternal

use of buildcraft.api.statements.ITriggerInternal in project LogisticsPipes by RS485.

the class LogisticsTriggerProvider method getInternalTriggers.

@Override
public Collection<ITriggerInternal> getInternalTriggers(IStatementContainer pipe) {
    if (pipe.getTile() instanceof LPBCTileGenericPipe) {
        LogisticsTileGenericPipe lPipe = ((LPBCTileGenericPipe) pipe.getTile()).getLpPipe();
        LinkedList<ITriggerInternal> triggers = new LinkedList<>();
        if (lPipe.pipe instanceof PipeItemsSupplierLogistics || lPipe.pipe instanceof PipeItemsFluidSupplier) {
            triggers.add(BuildCraftProxy.LogisticsFailedTrigger);
        }
        if (lPipe.pipe instanceof PipeItemsCraftingLogistics) {
            triggers.add(BuildCraftProxy.LogisticsCraftingTrigger);
        }
        if (lPipe.pipe instanceof CoreRoutedPipe) {
            //Only show this conditional on Gates that can accept parameters
            triggers.add(BuildCraftProxy.LogisticsHasDestinationTrigger);
        }
        if (!triggers.isEmpty()) {
            return triggers;
        }
    }
    return null;
}
Also used : PipeItemsCraftingLogistics(logisticspipes.pipes.PipeItemsCraftingLogistics) PipeItemsFluidSupplier(logisticspipes.pipes.PipeItemsFluidSupplier) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) PipeItemsSupplierLogistics(logisticspipes.pipes.PipeItemsSupplierLogistics) CoreRoutedPipe(logisticspipes.pipes.basic.CoreRoutedPipe) LPBCTileGenericPipe(logisticspipes.proxy.buildcraft.subproxies.LPBCTileGenericPipe) LinkedList(java.util.LinkedList) ITriggerInternal(buildcraft.api.statements.ITriggerInternal)

Aggregations

ITriggerInternal (buildcraft.api.statements.ITriggerInternal)1 LinkedList (java.util.LinkedList)1 PipeItemsCraftingLogistics (logisticspipes.pipes.PipeItemsCraftingLogistics)1 PipeItemsFluidSupplier (logisticspipes.pipes.PipeItemsFluidSupplier)1 PipeItemsSupplierLogistics (logisticspipes.pipes.PipeItemsSupplierLogistics)1 CoreRoutedPipe (logisticspipes.pipes.basic.CoreRoutedPipe)1 LogisticsTileGenericPipe (logisticspipes.pipes.basic.LogisticsTileGenericPipe)1 LPBCTileGenericPipe (logisticspipes.proxy.buildcraft.subproxies.LPBCTileGenericPipe)1