Search in sources :

Example 6 with IGate

use of buildcraft.api.gates.IGate in project BuildCraft by BuildCraft.

the class TriggerParameterSignal method getPossible.

@Override
public TriggerParameterSignal[] getPossible(IStatementContainer source) {
    if (!(source instanceof IGate)) {
        return null;
    }
    IGate gate = (IGate) source;
    List<TriggerParameterSignal> poss = new ArrayList<>(ColourUtil.COLOURS.length * 2 + 1);
    poss.add(EMPTY);
    for (EnumDyeColor c : ColourUtil.COLOURS) {
        if (TriggerPipeSignal.doesGateHaveColour(gate, c)) {
            poss.add(get(true, c));
            poss.add(get(false, c));
        }
    }
    return poss.toArray(new TriggerParameterSignal[poss.size()]);
}
Also used : IGate(buildcraft.api.gates.IGate) ArrayList(java.util.ArrayList) EnumDyeColor(net.minecraft.item.EnumDyeColor)

Aggregations

IGate (buildcraft.api.gates.IGate)6 IStatementParameter (buildcraft.api.statements.IStatementParameter)2 ArrayList (java.util.ArrayList)2 EnumDyeColor (net.minecraft.item.EnumDyeColor)2 IStatement (buildcraft.api.statements.IStatement)1 StatementSlot (buildcraft.api.statements.StatementSlot)1 IWireManager (buildcraft.api.transport.IWireManager)1 IPipeHolder (buildcraft.api.transport.pipe.IPipeHolder)1 PipePluggable (buildcraft.api.transport.pluggable.PipePluggable)1 StatementParamGateSideOnly (buildcraft.core.statements.StatementParamGateSideOnly)1 StatementParameterRedstoneLevel (buildcraft.core.statements.StatementParameterRedstoneLevel)1 TileGenericPipe (buildcraft.transport.TileGenericPipe)1 PluggablePulsar (buildcraft.transport.plug.PluggablePulsar)1 EnumFacing (net.minecraft.util.EnumFacing)1