Search in sources :

Example 1 with IWireEmitter

use of buildcraft.transport.wire.IWireEmitter in project BuildCraft by BuildCraft.

the class ActionPipeSignal method actionActivate.

@Override
public void actionActivate(IStatementContainer container, IStatementParameter[] parameters) {
    if (!(container instanceof IWireEmitter)) {
        return;
    }
    IWireEmitter emitter = (IWireEmitter) container;
    emitter.emitWire(colour);
    for (IStatementParameter param : parameters) {
        if (param != null && param instanceof ActionParameterSignal) {
            ActionParameterSignal signal = (ActionParameterSignal) param;
            if (signal.getColor() != null) {
                emitter.emitWire(signal.getColor());
            }
        }
    }
}
Also used : IStatementParameter(buildcraft.api.statements.IStatementParameter) IWireEmitter(buildcraft.transport.wire.IWireEmitter)

Aggregations

IStatementParameter (buildcraft.api.statements.IStatementParameter)1 IWireEmitter (buildcraft.transport.wire.IWireEmitter)1