Search in sources :

Example 1 with TileBuffer

use of logisticspipes.utils.TileBuffer in project LogisticsPipes by RS485.

the class LogisticsTileGenericPipe method computeConnections.

private void computeConnections() {
    TileBuffer[] cache = getTileCache();
    if (cache == null) {
        return;
    }
    boolean[] pipeTDConnectionsBufferOld = pipeTDConnectionsBuffer.clone();
    for (ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
        TileBuffer t = cache[side.ordinal()];
        t.refresh();
        pipeConnectionsBuffer[side.ordinal()] = canPipeConnect(t.getTile(), side);
        if (pipeConnectionsBuffer[side.ordinal()]) {
            pipeBCConnectionsBuffer[side.ordinal()] = SimpleServiceLocator.buildCraftProxy.isTileGenericPipe(t.getTile());
            pipeTDConnectionsBuffer[side.ordinal()] = SimpleServiceLocator.thermalDynamicsProxy.isItemDuct(t.getTile());
        } else {
            pipeBCConnectionsBuffer[side.ordinal()] = false;
            pipeTDConnectionsBuffer[side.ordinal()] = false;
        }
    }
    if (!Arrays.equals(pipeTDConnectionsBufferOld, pipeTDConnectionsBuffer)) {
        tdPart.connectionsChanged();
    }
}
Also used : TileBuffer(logisticspipes.utils.TileBuffer) ForgeDirection(net.minecraftforge.common.util.ForgeDirection)

Aggregations

TileBuffer (logisticspipes.utils.TileBuffer)1 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)1