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