Search in sources :

Example 1 with ActionPipeColor

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

the class PipeBehaviourDaizuli method onActionActivate.

@Override
public void onActionActivate(PipeEventActionActivate event) {
    super.onActionActivate(event);
    if (event.action instanceof ActionPipeColor) {
        ActionPipeColor action = ((ActionPipeColor) event.action);
        if (this.colour != action.color) {
            this.colour = action.color;
            pipe.getHolder().scheduleNetworkUpdate(PipeMessageReceiver.BEHAVIOUR);
        }
    }
}
Also used : ActionPipeColor(buildcraft.transport.statements.ActionPipeColor)

Example 2 with ActionPipeColor

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

the class PipeBehaviourLapis method onActionActivated.

@PipeEventHandler
public void onActionActivated(PipeEventActionActivate event) {
    if (event.action instanceof ActionPipeColor) {
        ActionPipeColor action = ((ActionPipeColor) event.action);
        if (this.colour != action.color) {
            this.colour = action.color;
            pipe.getHolder().scheduleNetworkUpdate(PipeMessageReceiver.BEHAVIOUR);
        }
    }
}
Also used : ActionPipeColor(buildcraft.transport.statements.ActionPipeColor) PipeEventHandler(buildcraft.api.transport.pipe.PipeEventHandler)

Aggregations

ActionPipeColor (buildcraft.transport.statements.ActionPipeColor)2 PipeEventHandler (buildcraft.api.transport.pipe.PipeEventHandler)1