Search in sources :

Example 1 with ActionExtractionPreset

use of buildcraft.transport.statements.ActionExtractionPreset in project BuildCraft by BuildCraft.

the class PipeBehaviourEmzuli method onActionActivate.

@Override
public void onActionActivate(PipeEventActionActivate event) {
    super.onActionActivate(event);
    if (event.action instanceof ActionExtractionPreset) {
        ActionExtractionPreset preset = (ActionExtractionPreset) event.action;
        activeSlots.add(preset.index);
        activatedTtl[preset.index.ordinal()] = 2;
    }
}
Also used : ActionExtractionPreset(buildcraft.transport.statements.ActionExtractionPreset)

Example 2 with ActionExtractionPreset

use of buildcraft.transport.statements.ActionExtractionPreset in project BuildCraft by BuildCraft.

the class PipeItemsEmzuli method actionsActivated.

@Override
protected void actionsActivated(Collection<StatementSlot> actions) {
    super.actionsActivated(actions);
    activeFlags.clear();
    for (StatementSlot action : actions) {
        if (action.statement instanceof ActionExtractionPreset) {
            setActivePreset(((ActionExtractionPreset) action.statement).color);
        }
    }
}
Also used : StatementSlot(buildcraft.api.statements.StatementSlot) ActionExtractionPreset(buildcraft.transport.statements.ActionExtractionPreset)

Aggregations

ActionExtractionPreset (buildcraft.transport.statements.ActionExtractionPreset)2 StatementSlot (buildcraft.api.statements.StatementSlot)1