TileEntity tile = iblockaccess.getTileEntity(i, j, k);
if (!(tile instanceof LogisticsTileGenericPipe)) {
return null;
}
if(((LogisticsTileGenericPipe)tile).pipe instanceof PipeBlockRequestTable) {
PipeBlockRequestTable table = (PipeBlockRequestTable) ((LogisticsTileGenericPipe)tile).pipe;
return table.getTextureFor(l);
}
if (((LogisticsTileGenericPipe) tile).renderState.textureArray != null) {
return ((LogisticsTileGenericPipe) tile).renderState.textureArray[l];
}
return ((LogisticsTileGenericPipe) tile).renderState.currentTexture;