Search in sources :

Example 1 with AttemptCreate

use of buildcraft.api.transport.pipe_bc8.event_bc8.IPipeEventConnection_BC8.AttemptCreate in project BuildCraft by BuildCraft.

the class BehaviourWood method onPipeAttemptConnect.

@BCPipeEventHandler
public void onPipeAttemptConnect(IPipeEventConnection_BC8.AttemptCreate event) {
    if (event instanceof IPipeEventConnection_BC8.AttemptCreate.Pipe) {
        AttemptCreate.Pipe pipeEvent = (AttemptCreate.Pipe) event;
        PipeBehaviour_BC8 other = pipeEvent.with().getBehaviour();
        if (other instanceof BehaviourWood) {
            event.disallow();
        }
    }
}
Also used : IPipeEventConnection_BC8(buildcraft.api.transport.pipe_bc8.event_bc8.IPipeEventConnection_BC8) PipeBehaviour_BC8(buildcraft.api.transport.pipe_bc8.PipeBehaviour_BC8) AttemptCreate(buildcraft.api.transport.pipe_bc8.event_bc8.IPipeEventConnection_BC8.AttemptCreate) BCPipeEventHandler(buildcraft.api.transport.pipe_bc8.BCPipeEventHandler)

Aggregations

BCPipeEventHandler (buildcraft.api.transport.pipe_bc8.BCPipeEventHandler)1 PipeBehaviour_BC8 (buildcraft.api.transport.pipe_bc8.PipeBehaviour_BC8)1 IPipeEventConnection_BC8 (buildcraft.api.transport.pipe_bc8.event_bc8.IPipeEventConnection_BC8)1 AttemptCreate (buildcraft.api.transport.pipe_bc8.event_bc8.IPipeEventConnection_BC8.AttemptCreate)1