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()]);
}
Aggregations